summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2001-02-20 15:36:12 +0000
committerFlorent Villard <warly@mandriva.com>2001-02-20 15:36:12 +0000
commitd71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f (patch)
tree5904f188d8eb96d30168e03490bddee9368e02fa /mdk-stage1
parentf8b3dc037ed026ade1b9e130f43af21e98437190 (diff)
downloaddrakx-backup-do-not-use-d71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f.tar
drakx-backup-do-not-use-d71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f.tar.gz
drakx-backup-do-not-use-d71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f.tar.bz2
drakx-backup-do-not-use-d71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f.tar.xz
drakx-backup-do-not-use-d71f1b5bcbf6552d3a7531e5f843db4dd5fd2d9f.zip
update rpmsrate
Diffstat (limited to 'mdk-stage1')
0 files changed, 0 insertions, 0 deletions
'n133' href='#n133'>133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743
#ifndef _PRIVATE_SLANG_H_
#define _PRIVATE_SLANG_H_
/* header file for S-Lang internal structures that users do not (should not)
   need.  Use slang.h for that purpose. */
/* Copyright (c) 1992, 1999, 2001 John E. Davis
 * This file is part of the S-Lang library.
 *
 * You may distribute under the terms of either the GNU General Public
 * License or the Perl Artistic License.
 */

/* #include "config.h" */
#include "jdmacros.h"
#include "sllimits.h"

#ifdef VMS
# define SLANG_SYSTEM_NAME "_VMS"
#else
# if defined (IBMPC_SYSTEM)
#  define SLANG_SYSTEM_NAME "_IBMPC"
# else
#  define SLANG_SYSTEM_NAME "_UNIX"
# endif
#endif  /* VMS */

/* These quantities are main_types for byte-compiled code.  They are used
 * by the inner_interp routine.  The _BC_ means byte-code.
 */

#define _SLANG_BC_LVARIABLE	SLANG_LVARIABLE   /* 0x01 */
#define _SLANG_BC_GVARIABLE	SLANG_GVARIABLE   /* 0x02 */
#define _SLANG_BC_IVARIABLE 	SLANG_IVARIABLE   /* 0x03 */
#define _SLANG_BC_RVARIABLE	SLANG_RVARIABLE   /* 0x04 */
#define _SLANG_BC_INTRINSIC 	SLANG_INTRINSIC   /* 0x05 */
#define _SLANG_BC_FUNCTION  	SLANG_FUNCTION   /* 0x06 */
#define _SLANG_BC_MATH_UNARY	SLANG_MATH_UNARY   /* 0x07 */
#define _SLANG_BC_APP_UNARY	SLANG_APP_UNARY   /* 0x08 */
#define _SLANG_BC_ICONST	SLANG_ICONSTANT   /* 0x09 */
#define _SLANG_BC_DCONST	SLANG_DCONSTANT   /* 0x0A */
#define _SLANG_BC_PVARIABLE	SLANG_PVARIABLE   /* 0x0B */
#define _SLANG_BC_PFUNCTION	SLANG_PFUNCTION   /* 0x0C */

#define _SLANG_BC_BINARY	0x10
#define _SLANG_BC_LITERAL	0x11           /* constant objects */
#define _SLANG_BC_LITERAL_INT	0x12
#define _SLANG_BC_LITERAL_STR	0x13
#define _SLANG_BC_BLOCK		0x14

/* These 3 MUST be in this order too ! */
#define _SLANG_BC_RETURN	0x15
#define _SLANG_BC_BREAK		0x16
#define _SLANG_BC_CONTINUE	0x17

#define _SLANG_BC_EXCH		0x18
#define _SLANG_BC_LABEL		0x19
#define _SLANG_BC_LOBJPTR	0x1A
#define _SLANG_BC_GOBJPTR	0x1B
#define _SLANG_BC_X_ERROR	0x1C
/* These must be in this order */
#define _SLANG_BC_X_USER0	0x1D
#define _SLANG_BC_X_USER1	0x1E
#define _SLANG_BC_X_USER2	0x1F
#define _SLANG_BC_X_USER3	0x20
#define _SLANG_BC_X_USER4	0x21

#define _SLANG_BC_CALL_DIRECT		0x24
#define _SLANG_BC_CALL_DIRECT_FRAME	0x25
#define _SLANG_BC_UNARY			0x26
#define _SLANG_BC_UNARY_FUNC		0x27

#define _SLANG_BC_DEREF_ASSIGN		0x30
#define _SLANG_BC_SET_LOCAL_LVALUE	0x31
#define _SLANG_BC_SET_GLOBAL_LVALUE	0x32
#define _SLANG_BC_SET_INTRIN_LVALUE	0x33
#define _SLANG_BC_SET_STRUCT_LVALUE	0x34
#define _SLANG_BC_FIELD			0x35
#define _SLANG_BC_SET_ARRAY_LVALUE	0x36

#define _SLANG_BC_LINE_NUM		0x40

#define _SLANG_BC_TMP			0x50
#define _SLANG_BC_LVARIABLE_AGET	0x60
#define _SLANG_BC_LVARIABLE_APUT	0x61
#define _SLANG_BC_INTEGER_PLUS		0x62
#define _SLANG_BC_INTEGER_MINUS		0x63
#define _SLANG_BC_ARG_LVARIABLE		0x64
#define _SLANG_BC_EARG_LVARIABLE	0x65

#define _SLANG_BC_CALL_DIRECT_INTRINSIC	0x80
#define _SLANG_BC_INTRINSIC_CALL_DIRECT	0x81
#define _SLANG_BC_CALL_DIRECT_LSTR	0x82
#define _SLANG_BC_CALL_DIRECT_SLFUN	0x83
#define _SLANG_BC_CALL_DIRECT_INTRSTOP	0x84
#define _SLANG_BC_INTRINSIC_STOP	0x85
#define _SLANG_BC_CALL_DIRECT_EARG_LVAR	0x86
#define _SLANG_BC_CALL_DIRECT_LINT	0x87
#define _SLANG_BC_CALL_DIRECT_LVAR	0x88


/* Byte-Code Sub Types (_BCST_) */

/* These are sub_types of _SLANG_BC_BLOCK */
#define _SLANG_BCST_ERROR_BLOCK	0x01
#define _SLANG_BCST_EXIT_BLOCK	0x02
#define _SLANG_BCST_USER_BLOCK0	0x03
#define _SLANG_BCST_USER_BLOCK1	0x04
#define _SLANG_BCST_USER_BLOCK2	0x05
#define _SLANG_BCST_USER_BLOCK3	0x06
#define _SLANG_BCST_USER_BLOCK4	0x07
/* The user blocks MUST be in the above order */
#define _SLANG_BCST_LOOP	0x10
#define _SLANG_BCST_WHILE	0x11
#define _SLANG_BCST_FOR		0x12
#define _SLANG_BCST_FOREVER	0x13
#define _SLANG_BCST_CFOR	0x14
#define _SLANG_BCST_DOWHILE	0x15
#define _SLANG_BCST_FOREACH	0x16

#define _SLANG_BCST_IF		0x20
#define _SLANG_BCST_IFNOT	0x21
#define _SLANG_BCST_ELSE	0x22
#define _SLANG_BCST_ANDELSE	0x23
#define _SLANG_BCST_ORELSE	0x24
#define _SLANG_BCST_SWITCH	0x25
#define _SLANG_BCST_NOTELSE	0x26

/* assignment (_SLANG_BC_SET_*_LVALUE) subtypes.  The order MUST correspond
 * to the assignment token order with the ASSIGN_TOKEN as the first!
 */
#define _SLANG_BCST_ASSIGN		0x01
#define _SLANG_BCST_PLUSEQS		0x02
#define _SLANG_BCST_MINUSEQS		0x03
#define _SLANG_BCST_TIMESEQS		0x04
#define _SLANG_BCST_DIVEQS		0x05
#define _SLANG_BCST_BOREQS		0x06
#define _SLANG_BCST_BANDEQS		0x07
#define _SLANG_BCST_PLUSPLUS		0x08
#define _SLANG_BCST_POST_PLUSPLUS	0x09
#define _SLANG_BCST_MINUSMINUS		0x0A
#define _SLANG_BCST_POST_MINUSMINUS	0x0B

/* These use SLANG_PLUS, SLANG_MINUS, SLANG_PLUSPLUS, etc... */

typedef union
{
#if SLANG_HAS_FLOAT
   double double_val;
   float float_val;
#endif
   long long_val;
   unsigned long ulong_val;
   VOID_STAR ptr_val;
   char *s_val;
   int int_val;
   unsigned int uint_val;
   SLang_MMT_Type *ref;
   SLang_Name_Type *n_val;
   struct _SLang_Struct_Type *struct_val;
   struct _SLang_Array_Type *array_val;
   short short_val;
   unsigned short ushort_val;
   char char_val;
   unsigned char uchar_val;
}
_SL_Object_Union_Type;

typedef struct _SLang_Object_Type
{
   unsigned char data_type;	       /* SLANG_INT_TYPE, ... */
   _SL_Object_Union_Type v;
}
SLang_Object_Type;

struct _SLang_MMT_Type
{
   unsigned char data_type;	       /* int, string, etc... */
   VOID_STAR user_data;	       /* address of user structure */
   unsigned int count;		       /* number of references */
};

extern int _SLang_pop_object_of_type (unsigned char, SLang_Object_Type *, int);

typedef struct
{
   char *name;			       /* slstring */
   SLang_Object_Type obj;
}
_SLstruct_Field_Type;

typedef struct _SLang_Struct_Type
{
   _SLstruct_Field_Type *fields;
   unsigned int nfields;	       /* number used */
   unsigned int num_refs;
}
_SLang_Struct_Type;

extern void _SLstruct_delete_struct (_SLang_Struct_Type *);
extern int _SLang_push_struct (_SLang_Struct_Type *);
extern int _SLang_pop_struct (_SLang_Struct_Type **);
extern int _SLstruct_init (void);
/* extern int _SLstruct_get_field (char *); */
extern int _SLstruct_define_struct (void);
extern int _SLstruct_define_typedef (void);

extern int _SLang_pop_datatype (unsigned char *);
extern int _SLang_push_datatype (unsigned char);

struct _SLang_Ref_Type
{
   int is_global;
   union
     {
	SLang_Name_Type *nt;
	SLang_Object_Type *local_obj;
     }
   v;
};

extern int _SLang_dereference_ref (SLang_Ref_Type *);
extern int _SLang_deref_assign (SLang_Ref_Type *);
extern int _SLang_push_ref (int, VOID_STAR);

extern int _SL_increment_frame_pointer (void);
extern int _SL_decrement_frame_pointer (void);

extern int SLang_pop(SLang_Object_Type *);
extern void SLang_free_object (SLang_Object_Type *);
extern int _SLanytype_typecast (unsigned char, VOID_STAR, unsigned int,
				unsigned char, VOID_STAR);
extern void _SLstring_intrinsic (void);


/* These functions are used to create slstrings of a fixed length.  Be
 * very careful how they are used.  In particular, if len bytes are allocated,
 * then the string must be len characters long, no more and no less.
 */
extern char *_SLallocate_slstring (unsigned int);
extern char *_SLcreate_via_alloced_slstring (char *, unsigned int);
extern void _SLunallocate_slstring (char *, unsigned int);
extern int _SLpush_alloced_slstring (char *, unsigned int);
  
typedef struct 
{
   char **buf;
   unsigned int max_num;
   unsigned int num;
   unsigned int delta_num;
}
_SLString_List_Type;
extern int _SLstring_list_append (_SLString_List_Type *, char *);
extern int _SLstring_list_init (_SLString_List_Type *, unsigned int, unsigned int);
extern void _SLstring_list_delete (_SLString_List_Type *);
extern int _SLstring_list_push (_SLString_List_Type *);

/* This function assumes that s is an slstring. */
extern char *_SLstring_dup_slstring (char *);
extern int _SLang_dup_and_push_slstring (char *);


extern int _SLang_init_import (void);

/* This function checks to see if the referenced object is initialized */
extern int _SLang_is_ref_initialized (SLang_Ref_Type *);
extern int _SLcheck_identifier_syntax (char *);
extern int _SLang_uninitialize_ref (SLang_Ref_Type *);

extern int _SLpush_slang_obj (SLang_Object_Type *);

extern char *_SLexpand_escaped_char(char *, char *);
extern void _SLexpand_escaped_string (char *, char *, char *);

/* returns a pointer to an SLstring string-- use SLang_free_slstring */
extern char *_SLstringize_object (SLang_Object_Type *);
extern int _SLdump_objects (char *, SLang_Object_Type *, unsigned int, int);

extern SLang_Object_Type *_SLRun_Stack;
extern SLang_Object_Type *_SLStack_Pointer;

struct _SLang_NameSpace_Type
{
   struct _SLang_NameSpace_Type *next;
   char *name;			       /* this is the load_type name */
   char *namespace_name;	       /* this name is assigned by implements */
   unsigned int table_size;
   SLang_Name_Type **table;
};
extern SLang_NameSpace_Type *_SLns_allocate_namespace (char *, unsigned int);
extern SLang_NameSpace_Type *_SLns_find_namespace (char *);
extern int _SLns_set_namespace_name (SLang_NameSpace_Type *, char *);
extern SLang_Array_Type *_SLnspace_apropos (SLang_NameSpace_Type *, char *, unsigned int);
extern void _SLang_use_namespace_intrinsic (char *name);
extern char *_SLang_cur_namespace_intrinsic (void);
extern SLang_Array_Type *_SLang_apropos (char *, char *, unsigned int);
extern void _SLang_implements_intrinsic (char *);

extern int _SLang_Trace;
extern int _SLstack_depth(void);
extern char *_SLang_Current_Function_Name;

extern int _SLang_trace_fun(char *);
extern int _SLang_Compile_Line_Num_Info;

extern char *_SLstring_dup_hashed_string (char *, unsigned long);
extern unsigned long _SLcompute_string_hash (char *);
extern char *_SLstring_make_hashed_string (char *, unsigned int, unsigned long *);
extern void _SLfree_hashed_string (char *, unsigned int, unsigned long);
unsigned long _SLstring_hash (unsigned char *, unsigned char *);
extern int _SLinit_slcomplex (void);

extern int _SLang_init_slstrops (void);
extern int _SLstrops_do_sprintf_n (int);
extern int _SLang_sscanf (void);
extern double _SLang_atof (char *);
extern int _SLang_init_bstring (void);
extern int _SLang_init_sltime (void);
extern void _SLpack (void);
extern void _SLunpack (char *, SLang_BString_Type *);
extern void _SLpack_pad_format (char *);
extern unsigned int _SLpack_compute_size (char *);
extern int _SLusleep (unsigned long);

/* frees upon error.  NULL __NOT__ ok. */
extern int _SLang_push_slstring (char *);

extern unsigned char _SLarith_promote_type (unsigned char);
extern int _SLarith_get_precedence (unsigned char);
extern int _SLarith_typecast (unsigned char, VOID_STAR, unsigned int,
			      unsigned char, VOID_STAR);

extern int SLang_push(SLang_Object_Type *);
extern int SLadd_global_variable (char *);
extern void _SLang_clear_error (void);

extern int _SLdo_pop (void);
extern unsigned int _SLsys_getkey (void);
extern int _SLsys_input_pending (int);
#ifdef IBMPC_SYSTEM
extern unsigned int _SLpc_convert_scancode (unsigned int, unsigned int, int);
#define _SLTT_KEY_SHIFT		1