Ticket #14429: bigintmat.ii

File bigintmat.ii, 174.9 KB (added by jpflori, 9 years ago)
Line 
1# 1 "bigintmat.cc"
2# 1 "/infres/post/flori/sage-5.9.beta3-infres2/spkg/build/singular-3-1-5.p7/src/kernel//"
3# 1 "<built-in>"
4# 1 "<command-line>"
5# 1 "bigintmat.cc"
6
7
8
9
10
11
12# 1 "../kernel/mod2.h" 1
13# 559 "../kernel/mod2.h"
14extern "C" {
15
16
17
18extern int dReportError(const char* fmt, ...);
19
20
21extern void dErrorBreak();
22
23}
24# 8 "bigintmat.cc" 2
25# 1 "../kernel/febase.h" 1
26# 9 "../kernel/febase.h"
27# 1 "/usr/include/stdio.h" 1 3 4
28# 20 "/usr/include/stdio.h" 3 4
29#pragma ident "@(#)stdio.h      1.84    04/09/28 SMI"
30
31# 1 "/usr/local/include/sys/feature_tests.h" 1 3 4
32# 9 "/usr/local/include/sys/feature_tests.h" 3 4
33#pragma ident "@(#)feature_tests.h      1.24    04/09/28 SMI"
34
35# 1 "/usr/local/include/sys/ccompile.h" 1 3 4
36# 9 "/usr/local/include/sys/ccompile.h" 3 4
37#pragma ident "@(#)ccompile.h   1.2     04/11/08 SMI"
38
39
40
41
42
43
44
45extern "C" {
46# 103 "/usr/local/include/sys/ccompile.h" 3 4
47}
48# 12 "/usr/local/include/sys/feature_tests.h" 2 3 4
49# 1 "/usr/local/include/sys/isa_defs.h" 1 3 4
50# 9 "/usr/local/include/sys/isa_defs.h" 3 4
51#pragma ident "@(#)isa_defs.h   1.27    04/10/01 SMI"
52# 191 "/usr/local/include/sys/isa_defs.h" 3 4
53extern "C" {
54# 508 "/usr/local/include/sys/isa_defs.h" 3 4
55}
56# 13 "/usr/local/include/sys/feature_tests.h" 2 3 4
57
58
59extern "C" {
60# 366 "/usr/local/include/sys/feature_tests.h" 3 4
61}
62# 23 "/usr/include/stdio.h" 2 3 4
63
64
65extern "C" {
66# 64 "/usr/include/stdio.h" 3 4
67}
68
69
70# 1 "/usr/include/iso/stdio_iso.h" 1 3 4
71# 32 "/usr/include/iso/stdio_iso.h" 3 4
72#pragma ident "@(#)stdio_iso.h  1.8     05/08/16 SMI"
73
74
75# 1 "/usr/include/sys/va_list.h" 1 3 4
76# 16 "/usr/include/sys/va_list.h" 3 4
77#pragma ident "@(#)va_list.h    1.15    04/11/19 SMI"
78# 54 "/usr/include/sys/va_list.h" 3 4
79extern "C" {
80# 99 "/usr/include/sys/va_list.h" 3 4
81typedef __builtin_va_list __gnuc_va_list;
82
83
84
85
86
87typedef __builtin_va_list __va_list;
88# 114 "/usr/include/sys/va_list.h" 3 4
89}
90# 36 "/usr/include/iso/stdio_iso.h" 2 3 4
91# 1 "/usr/include/stdio_tag.h" 1 3 4
92# 9 "/usr/include/stdio_tag.h" 3 4
93#pragma ident "@(#)stdio_tag.h  1.4     04/09/28 SMI"
94
95
96extern "C" {
97# 21 "/usr/include/stdio_tag.h" 3 4
98typedef struct __FILE __FILE;
99
100
101
102}
103# 37 "/usr/include/iso/stdio_iso.h" 2 3 4
104# 1 "/usr/include/stdio_impl.h" 1 3 4
105# 9 "/usr/include/stdio_impl.h" 3 4
106#pragma ident "@(#)stdio_impl.h 1.15    07/03/05 SMI"
107
108
109
110
111extern "C" {
112# 29 "/usr/include/stdio_impl.h" 3 4
113struct __FILE
114{
115
116
117
118
119 int _cnt;
120 unsigned char *_ptr;
121
122 unsigned char *_base;
123 unsigned char _flag;
124 unsigned char _file;
125
126 unsigned __orientation:2;
127 unsigned __ionolock:1;
128 unsigned __seekable:1;
129 unsigned __extendedfd:1;
130 unsigned __xf_nocheck:1;
131 unsigned __filler:10;
132};
133
134
135
136
137}
138# 38 "/usr/include/iso/stdio_iso.h" 2 3 4
139# 48 "/usr/include/iso/stdio_iso.h" 3 4
140extern "C" {
141# 58 "/usr/include/iso/stdio_iso.h" 3 4
142typedef long long __longlong_t;
143# 74 "/usr/include/iso/stdio_iso.h" 3 4
144typedef __FILE FILE;
145
146
147
148
149
150
151
152typedef unsigned int size_t;
153
154
155
156
157typedef long fpos_t;
158# 146 "/usr/include/iso/stdio_iso.h" 3 4
159extern __FILE __iob[20];
160# 189 "/usr/include/iso/stdio_iso.h" 3 4
161extern int remove(const char *);
162extern int rename(const char *, const char *);
163extern FILE *tmpfile(void);
164extern char *tmpnam(char *);
165extern int fclose(FILE *);
166extern int fflush(FILE *);
167extern FILE *fopen(const char *restrict, const char *restrict);
168extern FILE *freopen(const char *restrict,
169   const char *restrict, FILE *restrict);
170extern void setbuf(FILE *restrict, char *restrict);
171extern int setvbuf(FILE *restrict, char *restrict, int,
172   size_t);
173
174extern int fprintf(FILE *restrict, const char *restrict, ...);
175
176extern int fscanf(FILE *restrict, const char *restrict, ...);
177
178extern int printf(const char *restrict, ...);
179
180extern int scanf(const char *restrict, ...);
181
182extern int sprintf(char *restrict, const char *restrict, ...);
183
184extern int sscanf(const char *restrict,
185   const char *restrict, ...);
186extern int vfprintf(FILE *restrict, const char *restrict,
187   __va_list);
188extern int vprintf(const char *restrict, __va_list);
189extern int vsprintf(char *restrict, const char *restrict,
190   __va_list);
191extern int fgetc(FILE *);
192extern char *fgets(char *restrict, int, FILE *restrict);
193extern int fputc(int, FILE *);
194extern int fputs(const char *restrict, FILE *restrict);
195
196
197extern int getc(FILE *);
198extern int putc(int, FILE *);
199
200
201
202extern int getchar(void);
203extern int putchar(int);
204
205extern char *gets(char *);
206extern int puts(const char *);
207extern int ungetc(int, FILE *);
208extern size_t fread(void *restrict, size_t, size_t,
209 FILE *restrict);
210extern size_t fwrite(const void *restrict, size_t, size_t,
211 FILE *restrict);
212
213extern int fgetpos(FILE *restrict, fpos_t *restrict);
214extern int fsetpos(FILE *, const fpos_t *);
215
216extern int fseek(FILE *, long, int);
217extern long ftell(FILE *);
218extern void rewind(FILE *);
219
220
221extern void clearerr(FILE *);
222extern int feof(FILE *);
223extern int ferror(FILE *);
224
225extern void perror(const char *);
226
227
228extern int __filbuf(FILE *);
229extern int __flsbuf(int, FILE *);
230# 372 "/usr/include/iso/stdio_iso.h" 3 4
231}
232# 68 "/usr/include/stdio.h" 2 3 4
233# 136 "/usr/include/stdio.h" 3 4
234# 1 "/usr/include/iso/stdio_c99.h" 1 3 4
235# 20 "/usr/include/iso/stdio_c99.h" 3 4
236#pragma ident "@(#)stdio_c99.h  1.2     04/03/29 SMI"
237
238
239extern "C" {
240# 54 "/usr/include/iso/stdio_c99.h" 3 4
241extern int vfscanf(FILE *restrict, const char *restrict, __va_list);
242extern int vscanf(const char *restrict, __va_list);
243extern int vsscanf(const char *restrict, const char *restrict,
244  __va_list);
245# 68 "/usr/include/iso/stdio_c99.h" 3 4
246extern int snprintf(char *restrict, size_t, const char *restrict,
247 ...);
248extern int vsnprintf(char *restrict, size_t, const char *restrict,
249 __va_list);
250# 80 "/usr/include/iso/stdio_c99.h" 3 4
251}
252# 137 "/usr/include/stdio.h" 2 3 4
253
254
255extern "C" {
256
257
258
259
260
261
262typedef long off_t;
263
264
265
266
267
268
269
270typedef __longlong_t off64_t;
271# 164 "/usr/include/stdio.h" 3 4
272typedef __longlong_t fpos64_t;
273# 175 "/usr/include/stdio.h" 3 4
274typedef __va_list va_list;
275# 198 "/usr/include/stdio.h" 3 4
276extern unsigned char _sibuf[], _sobuf[];
277# 230 "/usr/include/stdio.h" 3 4
278extern unsigned char *_bufendtab[];
279extern FILE *_lastbuf;
280# 254 "/usr/include/stdio.h" 3 4
281extern char *tmpnam_r(char *);
282
283
284
285
286extern void setbuffer(FILE *, char *, size_t);
287extern int setlinebuf(FILE *);
288# 269 "/usr/include/stdio.h" 3 4
289extern FILE *fdopen(int, const char *);
290extern char *ctermid(char *);
291extern int fileno(FILE *);
292# 280 "/usr/include/stdio.h" 3 4
293extern void flockfile(FILE *);
294extern int ftrylockfile(FILE *);
295extern void funlockfile(FILE *);
296extern int getc_unlocked(FILE *);
297extern int getchar_unlocked(void);
298extern int putc_unlocked(int, FILE *);
299extern int putchar_unlocked(int);
300# 295 "/usr/include/stdio.h" 3 4
301extern FILE *popen(const char *, const char *);
302extern char *tempnam(const char *, const char *);
303extern int pclose(FILE *);
304
305
306
307
308
309
310extern char *cuserid(char *);
311extern int getopt(int, char *const *, const char *);
312extern char *optarg;
313extern int optind, opterr, optopt;
314extern int getw(FILE *);
315extern int putw(int, FILE *);
316# 318 "/usr/include/stdio.h" 3 4
317extern int fseeko(FILE *, off_t, int);
318extern off_t ftello(FILE *);
319# 328 "/usr/include/stdio.h" 3 4
320extern FILE *fopen64(const char *, const char *);
321extern FILE *freopen64(const char *, const char *, FILE *);
322extern FILE *tmpfile64(void);
323extern int fgetpos64(FILE *, fpos64_t *);
324extern int fsetpos64(FILE *, const fpos64_t *);
325extern int fseeko64(FILE *, off64_t, int);
326extern off64_t ftello64(FILE *);
327# 440 "/usr/include/stdio.h" 3 4
328}
329# 10 "../kernel/febase.h" 2
330# 1 "/usr/include/string.h" 1 3 4
331# 16 "/usr/include/string.h" 3 4
332#pragma ident "@(#)string.h     1.27    07/01/14 SMI"
333
334# 1 "/usr/include/iso/string_iso.h" 1 3 4
335# 28 "/usr/include/iso/string_iso.h" 3 4
336#pragma ident "@(#)string_iso.h 1.5     04/06/18 SMI"
337
338
339
340
341extern "C" {
342# 59 "/usr/include/iso/string_iso.h" 3 4
343extern int memcmp(const void *, const void *, size_t);
344extern void *memcpy(void *restrict, const void *restrict, size_t);
345extern void *memmove(void *, const void *, size_t);
346extern void *memset(void *, int, size_t);
347extern char *strcat(char *restrict, const char *restrict);
348extern int strcmp(const char *, const char *);
349extern char *strcpy(char *restrict, const char *restrict);
350extern int strcoll(const char *, const char *);
351extern size_t strcspn(const char *, const char *);
352extern char *strerror(int);
353extern size_t strlen(const char *);
354extern char *strncat(char *restrict, const char *restrict, size_t);
355extern int strncmp(const char *, const char *, size_t);
356extern char *strncpy(char *restrict, const char *restrict, size_t);
357extern size_t strspn(const char *, const char *);
358extern char *strtok(char *restrict, const char *restrict);
359extern size_t strxfrm(char *restrict, const char *restrict, size_t);
360# 129 "/usr/include/iso/string_iso.h" 3 4
361extern void *memchr(const void *, int, size_t);
362extern char *strchr(const char *, int);
363extern char *strpbrk(const char *, const char *);
364extern char *strrchr(const char *, int);
365extern char *strstr(const char *, const char *);
366# 168 "/usr/include/iso/string_iso.h" 3 4
367}
368# 19 "/usr/include/string.h" 2 3 4
369# 51 "/usr/include/string.h" 3 4
370extern "C" {
371
372
373
374
375
376
377
378extern int strerror_r(int, char *, size_t);
379
380
381
382
383
384extern char *strtok_r(char *restrict, const char *restrict,
385 char **restrict);
386
387
388
389
390extern void *memccpy(void *restrict, const void *restrict,
391  int, size_t);
392
393
394
395
396extern int uucopy(const void *restrict, void *restrict, size_t);
397extern int uucopystr(const void *restrict, void *restrict, size_t);
398extern char *strsignal(int);
399extern int ffs(int);
400extern int strcasecmp(const char *, const char *);
401extern int strncasecmp(const char *, const char *, size_t);
402extern size_t strlcpy(char *, const char *, size_t);
403extern size_t strlcat(char *, const char *, size_t);
404
405
406
407
408
409extern char *strdup(const char *);
410# 128 "/usr/include/string.h" 3 4
411}
412# 11 "../kernel/febase.h" 2
413# 1 "../kernel/structs.h" 1
414# 13 "../kernel/structs.h"
415# 1 "../omalloc/omalloc.h" 1
416# 15 "../omalloc/omalloc.h"
417# 1 "/usr/include/stdlib.h" 1 3 4
418# 16 "/usr/include/stdlib.h" 3 4
419#pragma ident "@(#)stdlib.h     1.51    04/06/30 SMI"
420
421# 1 "/usr/include/iso/stdlib_iso.h" 1 3 4
422# 28 "/usr/include/iso/stdlib_iso.h" 3 4
423#pragma ident "@(#)stdlib_iso.h 1.9     04/09/28 SMI"
424
425
426
427
428extern "C" {
429
430
431
432extern unsigned char __ctype[];
433# 48 "/usr/include/iso/stdlib_iso.h" 3 4
434typedef struct {
435 int quot;
436 int rem;
437} div_t;
438
439typedef struct {
440 long quot;
441 long rem;
442} ldiv_t;
443# 107 "/usr/include/iso/stdlib_iso.h" 3 4
444extern void abort(void) __attribute__((__noreturn__));
445extern int abs(int);
446extern int atexit(void (*)(void));
447extern double atof(const char *);
448extern int atoi(const char *);
449extern long int atol(const char *);
450extern void *bsearch(const void *, const void *, size_t, size_t,
451 int (*)(const void *, const void *));
452
453
454
455
456
457
458extern void *calloc(size_t, size_t);
459extern div_t div(int, int);
460extern void exit(int)
461 __attribute__((__noreturn__));
462extern void free(void *);
463extern char *getenv(const char *);
464extern long int labs(long);
465extern ldiv_t ldiv(long, long);
466extern void *malloc(size_t);
467extern int mblen(const char *, size_t);
468extern size_t mbstowcs(wchar_t *restrict, const char *restrict,
469 size_t);
470extern int mbtowc(wchar_t *restrict, const char *restrict, size_t);
471extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
472
473
474
475
476
477extern int rand(void);
478extern void *realloc(void *, size_t);
479extern void srand(unsigned int);
480extern double strtod(const char *restrict, char **restrict);
481extern long int strtol(const char *restrict, char **restrict, int);
482extern unsigned long int strtoul(const char *restrict,
483 char **restrict, int);
484extern int system(const char *);
485extern int wctomb(char *, wchar_t);
486extern size_t wcstombs(char *restrict, const wchar_t *restrict,
487 size_t);
488# 197 "/usr/include/iso/stdlib_iso.h" 3 4
489}
490# 19 "/usr/include/stdlib.h" 2 3 4
491# 1 "/usr/include/iso/stdlib_c99.h" 1 3 4
492# 20 "/usr/include/iso/stdlib_c99.h" 3 4
493#pragma ident "@(#)stdlib_c99.h 1.2     04/03/29 SMI"
494
495
496extern "C" {
497# 35 "/usr/include/iso/stdlib_c99.h" 3 4
498typedef struct {
499 long long quot;
500 long long rem;
501} lldiv_t;
502
503
504
505
506
507
508
509extern void _Exit(int);
510extern float strtof(const char *restrict, char **restrict);
511extern long double strtold(const char *restrict, char **restrict);
512
513
514extern long long atoll(const char *);
515extern long long llabs(long long);
516extern lldiv_t lldiv(long long, long long);
517extern long long strtoll(const char *restrict, char **restrict,
518 int);
519extern unsigned long long strtoull(const char *restrict,
520 char **restrict, int);
521# 83 "/usr/include/iso/stdlib_c99.h" 3 4
522}
523# 20 "/usr/include/stdlib.h" 2 3 4
524
525
526# 1 "/usr/include/sys/wait.h" 1 3 4
527# 16 "/usr/include/sys/wait.h" 3 4
528#pragma ident "@(#)wait.h       1.23    04/06/03 SMI"
529
530
531
532# 1 "/usr/include/sys/types.h" 1 3 4
533# 16 "/usr/include/sys/types.h" 3 4
534#pragma ident "@(#)types.h      1.86    07/09/20 SMI"
535
536
537
538
539
540
541
542# 1 "/usr/include/sys/machtypes.h" 1 3 4
543# 16 "/usr/include/sys/machtypes.h" 3 4
544#pragma ident "@(#)machtypes.h  1.13    99/05/04 SMI"
545
546
547
548
549extern "C" {
550# 33 "/usr/include/sys/machtypes.h" 3 4
551typedef struct _label_t { long val[2]; } label_t;
552
553
554
555typedef unsigned char lock_t;
556
557
558}
559# 25 "/usr/include/sys/types.h" 2 3 4
560# 36 "/usr/include/sys/types.h" 3 4
561# 1 "/usr/local/include/sys/int_types.h" 1 3 4
562# 9 "/usr/local/include/sys/int_types.h" 3 4
563#pragma ident "@(#)int_types.h  1.10    04/09/28 SMI"
564# 37 "/usr/local/include/sys/int_types.h" 3 4
565extern "C" {
566# 54 "/usr/local/include/sys/int_types.h" 3 4
567typedef char int8_t;
568
569
570
571
572
573typedef short int16_t;
574typedef int int32_t;
575
576
577
578
579
580
581typedef long long int64_t;
582
583
584
585typedef unsigned char uint8_t;
586typedef unsigned short uint16_t;
587typedef unsigned int uint32_t;
588
589
590
591
592typedef unsigned long long uint64_t;
593# 88 "/usr/local/include/sys/int_types.h" 3 4
594typedef int64_t intmax_t;
595typedef uint64_t uintmax_t;
596# 104 "/usr/local/include/sys/int_types.h" 3 4
597typedef int intptr_t;
598typedef unsigned int uintptr_t;
599
600
601
602
603
604
605
606typedef char int_fast8_t;
607
608
609
610
611
612typedef int int_fast16_t;
613typedef int int_fast32_t;
614
615
616
617
618typedef long long int_fast64_t;
619
620
621
622typedef unsigned char uint_fast8_t;
623typedef unsigned int uint_fast16_t;
624typedef unsigned int uint_fast32_t;
625
626
627
628
629typedef unsigned long long uint_fast64_t;
630# 145 "/usr/local/include/sys/int_types.h" 3 4
631typedef char int_least8_t;
632
633
634
635
636
637typedef short int_least16_t;
638typedef int int_least32_t;
639
640
641
642
643typedef long long int_least64_t;
644
645
646
647typedef unsigned char uint_least8_t;
648typedef unsigned short uint_least16_t;
649typedef unsigned int uint_least32_t;
650
651
652
653
654typedef unsigned long long uint_least64_t;
655
656
657
658
659}
660# 37 "/usr/include/sys/types.h" 2 3 4
661
662
663
664
665
666
667
668extern "C" {
669# 53 "/usr/include/sys/types.h" 3 4
670typedef long long longlong_t;
671typedef unsigned long long u_longlong_t;
672# 76 "/usr/include/sys/types.h" 3 4
673typedef long t_scalar_t;
674typedef unsigned long t_uscalar_t;
675
676
677
678
679
680typedef unsigned char uchar_t;
681typedef unsigned short ushort_t;
682typedef unsigned int uint_t;
683typedef unsigned long ulong_t;
684
685typedef char *caddr_t;
686typedef long daddr_t;
687typedef short cnt_t;
688
689
690
691
692
693
694typedef int ptrdiff_t;
695
696
697
698
699
700
701typedef ulong_t pfn_t;
702typedef ulong_t pgcnt_t;
703typedef long spgcnt_t;
704
705typedef uchar_t use_t;
706typedef short sysid_t;
707typedef short index_t;
708typedef void *timeout_id_t;
709typedef void *bufcall_id_t;
710# 142 "/usr/include/sys/types.h" 3 4
711typedef ulong_t ino_t;
712typedef long blkcnt_t;
713typedef ulong_t fsblkcnt_t;
714typedef ulong_t fsfilcnt_t;
715# 160 "/usr/include/sys/types.h" 3 4
716typedef u_longlong_t ino64_t;
717typedef longlong_t blkcnt64_t;
718typedef u_longlong_t fsblkcnt64_t;
719typedef u_longlong_t fsfilcnt64_t;
720
721
722
723
724
725
726typedef long blksize_t;
727
728
729
730typedef enum { _B_FALSE, _B_TRUE } boolean_t;
731# 192 "/usr/include/sys/types.h" 3 4
732typedef int64_t pad64_t;
733typedef uint64_t upad64_t;
734# 206 "/usr/include/sys/types.h" 3 4
735typedef union {
736 long double _q;
737 int32_t _l[4];
738} pad128_t;
739
740typedef union {
741 long double _q;
742 uint32_t _l[4];
743} upad128_t;
744
745typedef longlong_t offset_t;
746typedef u_longlong_t u_offset_t;
747typedef u_longlong_t len_t;
748typedef u_longlong_t diskaddr_t;
749# 240 "/usr/include/sys/types.h" 3 4
750typedef union {
751 offset_t _f;
752 struct {
753  int32_t _u;
754  int32_t _l;
755 } _p;
756} lloff_t;
757# 260 "/usr/include/sys/types.h" 3 4
758typedef union {
759 longlong_t _f;
760 struct {
761  int32_t _u;
762  int32_t _l;
763 } _p;
764} lldaddr_t;
765
766
767typedef uint_t k_fltset_t;
768# 283 "/usr/include/sys/types.h" 3 4
769typedef long id_t;
770
771
772typedef id_t lgrp_id_t;
773
774
775
776
777
778typedef uint_t useconds_t;
779
780
781
782typedef long suseconds_t;
783# 306 "/usr/include/sys/types.h" 3 4
784typedef ulong_t major_t;
785typedef ulong_t minor_t;
786
787
788
789
790
791typedef short pri_t;
792
793
794
795
796
797typedef ushort_t cpu_flag_t;
798# 332 "/usr/include/sys/types.h" 3 4
799typedef ushort_t o_mode_t;
800typedef short o_dev_t;
801typedef ushort_t o_uid_t;
802typedef o_uid_t o_gid_t;
803typedef short o_nlink_t;
804typedef short o_pid_t;
805typedef ushort_t o_ino_t;
806
807
808
809
810
811typedef int key_t;
812
813
814
815typedef ulong_t mode_t;
816
817
818
819
820
821
822
823typedef long uid_t;
824
825
826
827typedef uid_t gid_t;
828
829typedef id_t taskid_t;
830typedef id_t projid_t;
831typedef id_t poolid_t;
832typedef id_t zoneid_t;
833typedef id_t ctid_t;
834
835
836
837
838
839
840typedef uint_t pthread_t;
841typedef uint_t pthread_key_t;
842
843
844
845
846
847
848
849typedef struct _pthread_mutex {
850 struct {
851  uint16_t __pthread_mutex_flag1;
852  uint8_t __pthread_mutex_flag2;
853  uint8_t __pthread_mutex_ceiling;
854  uint16_t __pthread_mutex_type;
855  uint16_t __pthread_mutex_magic;
856 } __pthread_mutex_flags;
857 union {
858  struct {
859   uint8_t __pthread_mutex_pad[8];
860  } __pthread_mutex_lock64;
861  struct {
862   uint32_t __pthread_ownerpid;
863   uint32_t __pthread_lockword;
864  } __pthread_mutex_lock32;
865  upad64_t __pthread_mutex_owner64;
866 } __pthread_mutex_lock;
867 upad64_t __pthread_mutex_data;
868} pthread_mutex_t;
869
870typedef struct _pthread_cond {
871 struct {
872  uint8_t __pthread_cond_flag[4];
873  uint16_t __pthread_cond_type;
874  uint16_t __pthread_cond_magic;
875 } __pthread_cond_flags;
876 upad64_t __pthread_cond_data;
877} pthread_cond_t;
878
879
880
881
882typedef struct _pthread_rwlock {
883 int32_t __pthread_rwlock_readers;
884 uint16_t __pthread_rwlock_type;
885 uint16_t __pthread_rwlock_magic;
886 pthread_mutex_t __pthread_rwlock_mutex;
887 pthread_cond_t __pthread_rwlock_readercv;
888 pthread_cond_t __pthread_rwlock_writercv;
889} pthread_rwlock_t;
890
891
892
893
894typedef struct {
895 uint32_t __pthread_barrier_count;
896 uint32_t __pthread_barrier_current;
897 upad64_t __pthread_barrier_cycle;
898 upad64_t __pthread_barrier_reserved;
899 pthread_mutex_t __pthread_barrier_lock;
900 pthread_cond_t __pthread_barrier_cond;
901} pthread_barrier_t;
902
903typedef pthread_mutex_t pthread_spinlock_t;
904
905
906
907
908typedef struct _pthread_attr {
909 void *__pthread_attrp;
910} pthread_attr_t;
911
912
913
914
915typedef struct _pthread_mutexattr {
916 void *__pthread_mutexattrp;
917} pthread_mutexattr_t;
918
919
920
921
922typedef struct _pthread_condattr {
923 void *__pthread_condattrp;
924} pthread_condattr_t;
925
926
927
928
929typedef struct _once {
930 upad64_t __pthread_once_pad[4];
931} pthread_once_t;
932
933
934
935
936
937typedef struct _pthread_rwlockattr {
938 void *__pthread_rwlockattrp;
939} pthread_rwlockattr_t;
940
941
942
943
944
945typedef struct {
946 void *__pthread_barrierattrp;
947} pthread_barrierattr_t;
948
949typedef ulong_t dev_t;
950
951
952
953
954
955typedef ulong_t nlink_t;
956typedef long pid_t;
957# 506 "/usr/include/sys/types.h" 3 4
958typedef int ssize_t;
959
960
961
962
963
964typedef long time_t;
965
966
967
968
969typedef long clock_t;
970
971
972
973
974typedef int clockid_t;
975
976
977
978
979typedef int timer_t;
980
981
982
983
984
985typedef unsigned char unchar;
986typedef unsigned short ushort;
987typedef unsigned int uint;
988typedef unsigned long ulong;
989# 588 "/usr/include/sys/types.h" 3 4
990typedef unsigned char u_char;
991typedef unsigned short u_short;
992typedef unsigned int u_int;
993typedef unsigned long u_long;
994typedef struct _quad { int val[2]; } quad_t;
995typedef quad_t quad;
996
997
998
999
1000
1001
1002# 1 "/usr/include/sys/select.h" 1 3 4
1003# 15 "/usr/include/sys/select.h" 3 4
1004#pragma ident "@(#)select.h     1.19    04/01/28 SMI"
1005
1006
1007
1008
1009
1010# 1 "/usr/include/sys/time_impl.h" 1 3 4
1011# 19 "/usr/include/sys/time_impl.h" 3 4
1012#pragma ident "@(#)time_impl.h  1.11    05/05/19 SMI"
1013
1014
1015
1016
1017extern "C" {
1018# 38 "/usr/include/sys/time_impl.h" 3 4
1019typedef struct timespec {
1020 time_t tv_sec;
1021 long tv_nsec;
1022} timespec_t;
1023# 62 "/usr/include/sys/time_impl.h" 3 4
1024typedef struct timespec timestruc_t;
1025# 76 "/usr/include/sys/time_impl.h" 3 4
1026typedef struct itimerspec {
1027 struct timespec it_interval;
1028 struct timespec it_value;
1029} itimerspec_t;
1030# 118 "/usr/include/sys/time_impl.h" 3 4
1031}
1032# 22 "/usr/include/sys/select.h" 2 3 4
1033
1034# 1 "/usr/include/sys/time.h" 1 3 4
1035# 22 "/usr/include/sys/time.h" 3 4
1036#pragma ident "@(#)time.h       2.76    05/06/14 SMI"
1037# 32 "/usr/include/sys/time.h" 3 4
1038extern "C" {
1039# 49 "/usr/include/sys/time.h" 3 4
1040struct timeval {
1041 time_t tv_sec;
1042 suseconds_t tv_usec;
1043};
1044# 81 "/usr/include/sys/time.h" 3 4
1045struct timezone {
1046 int tz_minuteswest;
1047 int tz_dsttime;
1048};
1049
1050
1051
1052
1053
1054}
1055# 99 "/usr/include/sys/time.h" 3 4
1056# 1 "/usr/include/sys/types.h" 1 3 4
1057# 100 "/usr/include/sys/time.h" 2 3 4
1058
1059
1060
1061extern "C" {
1062# 150 "/usr/include/sys/time.h" 3 4
1063struct itimerval {
1064 struct timeval it_interval;
1065 struct timeval it_value;
1066};
1067# 197 "/usr/include/sys/time.h" 3 4
1068typedef longlong_t hrtime_t;
1069# 321 "/usr/include/sys/time.h" 3 4
1070int adjtime(struct timeval *, struct timeval *);
1071# 330 "/usr/include/sys/time.h" 3 4
1072int futimesat(int, const char *, const struct timeval *);
1073# 341 "/usr/include/sys/time.h" 3 4
1074int getitimer(int, struct itimerval *);
1075int utimes(const char *, const struct timeval *);
1076
1077int setitimer(int, const struct itimerval *restrict,
1078 struct itimerval *restrict);
1079# 379 "/usr/include/sys/time.h" 3 4
1080int settimeofday(struct timeval *, void *);
1081
1082hrtime_t gethrtime(void);
1083hrtime_t gethrvtime(void);
1084# 398 "/usr/include/sys/time.h" 3 4
1085int gettimeofday(struct timeval *restrict, void *restrict);
1086# 418 "/usr/include/sys/time.h" 3 4
1087# 1 "/usr/include/time.h" 1 3 4
1088# 16 "/usr/include/time.h" 3 4
1089#pragma ident "@(#)time.h       1.45    08/01/09 SMI"
1090
1091
1092# 1 "/usr/include/iso/time_iso.h" 1 3 4
1093# 28 "/usr/include/iso/time_iso.h" 3 4
1094#pragma ident "@(#)time_iso.h   1.4     04/09/07 SMI"
1095
1096
1097
1098
1099extern "C" {
1100# 69 "/usr/include/iso/time_iso.h" 3 4
1101struct tm {
1102 int tm_sec;
1103 int tm_min;
1104 int tm_hour;
1105 int tm_mday;
1106 int tm_mon;
1107 int tm_year;
1108 int tm_wday;
1109 int tm_yday;
1110 int tm_isdst;
1111};
1112
1113
1114
1115
1116extern char *asctime(const struct tm *);
1117extern clock_t clock(void);
1118extern char *ctime(const time_t *);
1119extern double difftime(time_t, time_t);
1120extern struct tm *gmtime(const time_t *);
1121extern struct tm *localtime(const time_t *);
1122extern time_t mktime(struct tm *);
1123extern time_t time(time_t *);
1124extern size_t strftime(char *restrict, size_t, const char *restrict,
1125 const struct tm *restrict);
1126# 114 "/usr/include/iso/time_iso.h" 3 4
1127}
1128# 20 "/usr/include/time.h" 2 3 4
1129# 47 "/usr/include/time.h" 3 4
1130extern "C" {
1131# 65 "/usr/include/time.h" 3 4
1132extern struct tm *gmtime_r(const time_t *restrict,
1133   struct tm *restrict);
1134extern struct tm *localtime_r(const time_t *restrict,
1135   struct tm *restrict);
1136# 83 "/usr/include/time.h" 3 4
1137extern char *strptime(const char *restrict, const char *restrict,
1138  struct tm *restrict);
1139# 103 "/usr/include/time.h" 3 4
1140union sigval {
1141 int sival_int;
1142 void *sival_ptr;
1143};
1144
1145
1146
1147
1148struct sigevent {
1149 int sigev_notify;
1150 int sigev_signo;
1151 union sigval sigev_value;
1152 void (*sigev_notify_function)(union sigval);
1153 pthread_attr_t *sigev_notify_attributes;
1154 int __sigev_pad2;
1155};
1156
1157
1158extern int clock_getres(clockid_t, struct timespec *);
1159extern int clock_gettime(clockid_t, struct timespec *);
1160extern int clock_settime(clockid_t, const struct timespec *);
1161extern int timer_create(clockid_t, struct sigevent *restrict,
1162  timer_t *restrict);
1163extern int timer_delete(timer_t);
1164extern int timer_getoverrun(timer_t);
1165extern int timer_gettime(timer_t, struct itimerspec *);
1166extern int timer_settime(timer_t, int, const struct itimerspec *restrict,
1167  struct itimerspec *restrict);
1168
1169extern int nanosleep(const struct timespec *, struct timespec *);
1170extern int clock_nanosleep(clockid_t, int,
1171 const struct timespec *, struct timespec *);
1172
1173
1174
1175
1176
1177
1178extern void tzset(void);
1179extern char *tzname[2];
1180
1181
1182
1183
1184extern long _sysconf(int);
1185
1186
1187
1188
1189
1190
1191
1192extern long timezone;
1193extern int daylight;
1194
1195
1196
1197
1198
1199
1200extern int cftime(char *, char *, const time_t *);
1201extern int ascftime(char *, const char *, const struct tm *);
1202extern long altzone;
1203
1204
1205
1206
1207extern struct tm *getdate(const char *);
1208
1209
1210
1211
1212
1213extern int getdate_err;
1214# 265 "/usr/include/time.h" 3 4
1215       
1216# 265 "/usr/include/time.h" 3 4
1217#pragma redefine_extname ctime_r __posix_ctime_r
1218# 265 "/usr/include/time.h" 3 4
1219
1220       
1221# 266 "/usr/include/time.h" 3 4
1222#pragma redefine_extname asctime_r __posix_asctime_r
1223# 266 "/usr/include/time.h" 3 4
1224
1225extern char *asctime_r(const struct tm *restrict, char *restrict);
1226extern char *ctime_r(const time_t *, char *);
1227# 355 "/usr/include/time.h" 3 4
1228}
1229# 419 "/usr/include/sys/time.h" 2 3 4
1230# 430 "/usr/include/sys/time.h" 3 4
1231# 1 "/usr/include/sys/select.h" 1 3 4
1232# 431 "/usr/include/sys/time.h" 2 3 4
1233
1234
1235
1236
1237
1238}
1239# 24 "/usr/include/sys/select.h" 2 3 4
1240
1241
1242
1243extern "C" {
1244# 44 "/usr/include/sys/select.h" 3 4
1245typedef struct {
1246 unsigned int __sigbits[4];
1247} sigset_t;
1248# 88 "/usr/include/sys/select.h" 3 4
1249typedef long fd_mask;
1250
1251typedef long fds_mask;
1252# 116 "/usr/include/sys/select.h" 3 4
1253typedef struct fd_set {
1254
1255
1256
1257 long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
1258} fd_set;
1259# 140 "/usr/include/sys/select.h" 3 4
1260extern int select(int, fd_set *restrict, fd_set *restrict,
1261 fd_set *restrict, struct timeval *restrict);
1262
1263
1264extern int pselect(int, fd_set *restrict, fd_set *restrict,
1265 fd_set *restrict, const struct timespec *restrict,
1266 const sigset_t *restrict);
1267# 158 "/usr/include/sys/select.h" 3 4
1268}
1269# 601 "/usr/include/sys/types.h" 2 3 4
1270# 617 "/usr/include/sys/types.h" 3 4
1271}
1272# 21 "/usr/include/sys/wait.h" 2 3 4
1273
1274
1275# 1 "/usr/include/sys/resource.h" 1 3 4
1276# 16 "/usr/include/sys/resource.h" 3 4
1277#pragma ident "@(#)resource.h   1.37    07/02/07 SMI"
1278
1279
1280
1281
1282
1283
1284
1285extern "C" {
1286# 71 "/usr/include/sys/resource.h" 3 4
1287typedef unsigned long rlim_t;
1288# 106 "/usr/include/sys/resource.h" 3 4
1289struct rlimit {
1290 rlim_t rlim_cur;
1291 rlim_t rlim_max;
1292};
1293
1294
1295
1296
1297typedef u_longlong_t rlim64_t;
1298
1299
1300
1301
1302
1303struct rlimit64 {
1304 rlim64_t rlim_cur;
1305 rlim64_t rlim_max;
1306};
1307# 145 "/usr/include/sys/resource.h" 3 4
1308struct rusage {
1309 struct timeval ru_utime;
1310 struct timeval ru_stime;
1311 long ru_maxrss;
1312 long ru_ixrss;
1313 long ru_idrss;
1314 long ru_isrss;
1315 long ru_minflt;
1316 long ru_majflt;
1317 long ru_nswap;
1318 long ru_inblock;
1319 long ru_oublock;
1320 long ru_msgsnd;
1321 long ru_msgrcv;
1322 long ru_nsignals;
1323 long ru_nvcsw;
1324 long ru_nivcsw;
1325};
1326# 237 "/usr/include/sys/resource.h" 3 4
1327extern int setrlimit(int, const struct rlimit *);
1328extern int getrlimit(int, struct rlimit *);
1329
1330
1331
1332
1333extern int setrlimit64(int, const struct rlimit64 *);
1334extern int getrlimit64(int, struct rlimit64 *);
1335
1336
1337extern int getpriority(int, id_t);
1338extern int setpriority(int, id_t, int);
1339extern int getrusage(int, struct rusage *);
1340# 272 "/usr/include/sys/resource.h" 3 4
1341}
1342# 24 "/usr/include/sys/wait.h" 2 3 4
1343# 1 "/usr/include/sys/siginfo.h" 1 3 4
1344# 21 "/usr/include/sys/siginfo.h" 3 4
1345#pragma ident "@(#)siginfo.h    1.59    04/07/15 SMI"
1346
1347
1348
1349
1350
1351extern "C" {
1352# 134 "/usr/include/sys/siginfo.h" 3 4
1353# 1 "/usr/include/sys/machsig.h" 1 3 4
1354# 16 "/usr/include/sys/machsig.h" 3 4
1355#pragma ident "@(#)machsig.h    1.15    99/08/15 SMI"
1356
1357
1358
1359
1360extern "C" {
1361# 107 "/usr/include/sys/machsig.h" 3 4
1362}
1363# 135 "/usr/include/sys/siginfo.h" 2 3 4
1364# 227 "/usr/include/sys/siginfo.h" 3 4
1365typedef struct siginfo {
1366
1367
1368
1369 int si_signo;
1370 int si_code;
1371 int si_errno;
1372
1373
1374
1375 union {
1376
1377  int __pad[((128 / sizeof (int)) - 3)];
1378
1379  struct {
1380   pid_t __pid;
1381   union {
1382    struct {
1383     uid_t __uid;
1384
1385
1386     union sigval __value;
1387
1388
1389
1390    } __kill;
1391    struct {
1392     clock_t __utime;
1393     int __status;
1394     clock_t __stime;
1395    } __cld;
1396   } __pdata;
1397   ctid_t __ctid;
1398   zoneid_t __zoneid;
1399  } __proc;
1400
1401  struct {
1402   void *__addr;
1403   int __trapno;
1404   caddr_t __pc;
1405  } __fault;
1406
1407  struct {
1408
1409   int __fd;
1410   long __band;
1411  } __file;
1412
1413  struct {
1414   caddr_t __faddr;
1415
1416   timestruc_t __tstamp;
1417
1418
1419
1420   short __syscall;
1421   char __nsysarg;
1422   char __fault;
1423   long __sysarg[8];
1424   int __mstate[10];
1425  } __prof;
1426
1427  struct {
1428   int32_t __entity;
1429  } __rctl;
1430 } __data;
1431
1432} siginfo_t;
1433# 369 "/usr/include/sys/siginfo.h" 3 4
1434typedef struct k_siginfo {
1435 int si_signo;
1436 int si_code;
1437 int si_errno;
1438
1439
1440
1441 union {
1442  struct {
1443   pid_t __pid;
1444   union {
1445    struct {
1446     uid_t __uid;
1447     union sigval __value;
1448    } __kill;
1449    struct {
1450     clock_t __utime;
1451     int __status;
1452     clock_t __stime;
1453    } __cld;
1454   } __pdata;
1455   ctid_t __ctid;
1456   zoneid_t __zoneid;
1457  } __proc;
1458
1459  struct {
1460   void *__addr;
1461   int __trapno;
1462   caddr_t __pc;
1463  } __fault;
1464
1465  struct {
1466
1467   int __fd;
1468   long __band;
1469  } __file;
1470
1471  struct {
1472   caddr_t __faddr;
1473
1474
1475   timestruc_t __tstamp;
1476
1477
1478
1479   short __syscall;
1480   char __nsysarg;
1481   char __fault;
1482
1483
1484
1485  } __prof;
1486
1487  struct {
1488   int32_t __entity;
1489  } __rctl;
1490
1491 } __data;
1492
1493} k_siginfo_t;
1494
1495typedef struct sigqueue {
1496 struct sigqueue *sq_next;
1497 k_siginfo_t sq_info;
1498 void (*sq_func)(struct sigqueue *);
1499 void *sq_backptr;
1500
1501 int sq_external;
1502} sigqueue_t;
1503# 478 "/usr/include/sys/siginfo.h" 3 4
1504}
1505# 25 "/usr/include/sys/wait.h" 2 3 4
1506# 1 "/usr/include/sys/procset.h" 1 3 4
1507# 16 "/usr/include/sys/procset.h" 3 4
1508#pragma ident "@(#)procset.h    1.25    04/07/16 SMI"
1509
1510
1511extern "C" {
1512
1513
1514
1515
1516# 1 "/usr/include/sys/signal.h" 1 3 4
1517# 16 "/usr/include/sys/signal.h" 3 4
1518#pragma ident "@(#)signal.h     1.66    04/09/28 SMI"
1519
1520
1521# 1 "/usr/include/sys/iso/signal_iso.h" 1 3 4
1522# 28 "/usr/include/sys/iso/signal_iso.h" 3 4
1523#pragma ident "@(#)signal_iso.h 1.6     03/05/02 SMI"
1524
1525# 1 "/usr/include/sys/unistd.h" 1 3 4
1526# 24 "/usr/include/sys/unistd.h" 3 4
1527#pragma ident "@(#)unistd.h     1.43    06/03/10 SMI"
1528
1529
1530
1531
1532extern "C" {
1533# 370 "/usr/include/sys/unistd.h" 3 4
1534}
1535# 31 "/usr/include/sys/iso/signal_iso.h" 2 3 4
1536
1537
1538extern "C" {
1539# 83 "/usr/include/sys/iso/signal_iso.h" 3 4
1540extern long _sysconf(int);
1541
1542
1543
1544
1545
1546typedef void SIG_FUNC_TYP(int);
1547typedef SIG_FUNC_TYP *SIG_TYP;
1548# 126 "/usr/include/sys/iso/signal_iso.h" 3 4
1549}
1550# 20 "/usr/include/sys/signal.h" 2 3 4
1551
1552
1553extern "C" {
1554# 56 "/usr/include/sys/signal.h" 3 4
1555typedef struct {
1556 unsigned int __sigbits[2];
1557} k_sigset_t;
1558# 74 "/usr/include/sys/signal.h" 3 4
1559struct sigaction {
1560 int sa_flags;
1561 union {
1562
1563  void (*_handler)(int);
1564
1565
1566
1567
1568
1569
1570  void (*_sigaction)(int, siginfo_t *, void *);
1571
1572 } _funcptr;
1573 sigset_t sa_mask;
1574
1575 int sa_resv[2];
1576
1577};
1578# 161 "/usr/include/sys/signal.h" 3 4
1579typedef struct sigaltstack {
1580
1581
1582
1583 void *ss_sp;
1584 size_t ss_size;
1585 int ss_flags;
1586} stack_t;
1587# 190 "/usr/include/sys/signal.h" 3 4
1588typedef struct signotify_id {
1589 pid_t sn_pid;
1590 int sn_index;
1591 int sn_pad;
1592} signotify_id_t;
1593# 220 "/usr/include/sys/signal.h" 3 4
1594struct sigstack {
1595 void *ss_sp;
1596 int ss_onstack;
1597};
1598
1599
1600
1601
1602
1603
1604
1605# 1 "/usr/include/sys/ucontext.h" 1 3 4
1606# 16 "/usr/include/sys/ucontext.h" 3 4
1607#pragma ident "@(#)ucontext.h   1.31    03/12/18 SMI"
1608
1609
1610
1611
1612# 1 "/usr/include/sys/regset.h" 1 3 4
1613# 16 "/usr/include/sys/regset.h" 3 4
1614#pragma ident "@(#)regset.h     1.29    07/09/06 SMI"
1615# 25 "/usr/include/sys/regset.h" 3 4
1616extern "C" {
1617# 97 "/usr/include/sys/regset.h" 3 4
1618typedef int greg_t;
1619# 107 "/usr/include/sys/regset.h" 3 4
1620typedef greg_t gregset_t[19];
1621# 129 "/usr/include/sys/regset.h" 3 4
1622struct rwindow {
1623 greg_t rw_local[8];
1624 greg_t rw_in[8];
1625};
1626# 156 "/usr/include/sys/regset.h" 3 4
1627typedef struct gwindows {
1628 int wbcnt;
1629 greg_t *spbuf[31];
1630 struct rwindow wbuf[31];
1631} gwindows_t;
1632# 193 "/usr/include/sys/regset.h" 3 4
1633struct fpq {
1634 unsigned int *fpq_addr;
1635 unsigned int fpq_instr;
1636};
1637
1638struct fq {
1639 union {
1640  double whole;
1641  struct fpq fpq;
1642 } FQu;
1643};
1644# 261 "/usr/include/sys/regset.h" 3 4
1645struct fpu {
1646 union {
1647  uint32_t fpu_regs[32];
1648  double fpu_dregs[16];
1649 } fpu_fr;
1650 struct fq *fpu_q;
1651 uint32_t fpu_fsr;
1652 uint8_t fpu_qcnt;
1653 uint8_t fpu_q_entrysize;
1654 uint8_t fpu_en;
1655};
1656
1657
1658
1659typedef struct fpu fpregset_t;
1660# 327 "/usr/include/sys/regset.h" 3 4
1661typedef struct {
1662 unsigned int xrs_id;
1663 caddr_t xrs_ptr;
1664} xrs_t;
1665# 371 "/usr/include/sys/regset.h" 3 4
1666typedef struct {
1667 gregset_t gregs;
1668 gwindows_t *gwins;
1669 fpregset_t fpregs;
1670 xrs_t xrs;
1671
1672
1673
1674
1675 long filler[19];
1676
1677} mcontext_t;
1678# 420 "/usr/include/sys/regset.h" 3 4
1679# 1 "/usr/include/v7/sys/privregs.h" 1 3 4
1680# 9 "/usr/include/v7/sys/privregs.h" 3 4
1681#pragma ident "@(#)privregs.h   1.8     03/05/22 SMI"
1682
1683
1684extern "C" {
1685# 24 "/usr/include/v7/sys/privregs.h" 3 4
1686# 1 "/usr/include/v7/sys/psr.h" 1 3 4
1687# 9 "/usr/include/v7/sys/psr.h" 3 4
1688#pragma ident "@(#)psr.h        1.4     03/04/21 SMI"
1689
1690
1691extern "C" {
1692# 46 "/usr/include/v7/sys/psr.h" 3 4
1693typedef int psw_t;
1694# 59 "/usr/include/v7/sys/psr.h" 3 4
1695}
1696# 25 "/usr/include/v7/sys/privregs.h" 2 3 4
1697# 1 "/usr/include/sys/fsr.h" 1 3 4
1698
1699
1700
1701
1702
1703
1704
1705#pragma ident "@(#)fsr.h        1.3     97/02/11 SMI"
1706
1707
1708extern "C" {
1709# 127 "/usr/include/sys/fsr.h" 3 4
1710}
1711# 26 "/usr/include/v7/sys/privregs.h" 2 3 4
1712# 34 "/usr/include/v7/sys/privregs.h" 3 4
1713struct regs {
1714 long r_psr;
1715 long r_pc;
1716 long r_npc;
1717 long r_y;
1718 long r_g1;
1719 long r_g2;
1720 long r_g3;
1721 long r_g4;
1722 long r_g5;
1723 long r_g6;
1724 long r_g7;
1725 long r_o0;
1726 long r_o1;
1727 long r_o2;
1728 long r_o3;
1729 long r_o4;
1730 long r_o5;
1731 long r_o6;
1732 long r_o7;
1733};
1734# 63 "/usr/include/v7/sys/privregs.h" 3 4
1735}
1736# 421 "/usr/include/sys/regset.h" 2 3 4
1737# 583 "/usr/include/sys/regset.h" 3 4
1738}
1739# 22 "/usr/include/sys/ucontext.h" 2 3 4
1740
1741# 1 "/usr/include/sys/signal.h" 1 3 4
1742# 24 "/usr/include/sys/ucontext.h" 2 3 4
1743
1744
1745
1746extern "C" {
1747# 56 "/usr/include/sys/ucontext.h" 3 4
1748typedef struct ucontext ucontext_t;
1749
1750
1751
1752
1753
1754struct ucontext {
1755
1756
1757
1758 uint_t uc_flags;
1759 ucontext_t *uc_link;
1760 sigset_t uc_sigmask;
1761 stack_t uc_stack;
1762 mcontext_t uc_mcontext;
1763
1764
1765
1766 long uc_filler[23];
1767
1768};
1769# 139 "/usr/include/sys/ucontext.h" 3 4
1770}
1771# 232 "/usr/include/sys/signal.h" 2 3 4
1772# 313 "/usr/include/sys/signal.h" 3 4
1773}
1774# 25 "/usr/include/sys/procset.h" 2 3 4
1775# 42 "/usr/include/sys/procset.h" 3 4
1776typedef enum
1777
1778 idtype
1779
1780  {
1781 P_PID,
1782 P_PPID,
1783 P_PGID,
1784
1785 P_SID,
1786 P_CID,
1787 P_UID,
1788 P_GID,
1789 P_ALL,
1790 P_LWPID,
1791 P_TASKID,
1792 P_PROJID,
1793 P_POOLID,
1794 P_ZONEID,
1795 P_CTID,
1796 P_CPUID,
1797 P_PSETID
1798} idtype_t;
1799# 73 "/usr/include/sys/procset.h" 3 4
1800typedef enum idop {
1801 POP_DIFF,
1802
1803
1804 POP_AND,
1805
1806
1807 POP_OR,
1808
1809
1810 POP_XOR
1811
1812
1813} idop_t;
1814
1815
1816
1817
1818
1819
1820
1821typedef struct procset {
1822 idop_t p_op;
1823
1824
1825
1826
1827 idtype_t p_lidtype;
1828
1829
1830 id_t p_lid;
1831
1832 idtype_t p_ridtype;
1833
1834
1835 id_t p_rid;
1836} procset_t;
1837# 139 "/usr/include/sys/procset.h" 3 4
1838}
1839# 26 "/usr/include/sys/wait.h" 2 3 4
1840
1841
1842
1843extern "C" {
1844# 82 "/usr/include/sys/wait.h" 3 4
1845extern pid_t wait(int *);
1846extern pid_t waitpid(pid_t, int *, int);
1847
1848
1849extern int waitid(idtype_t, id_t, siginfo_t *, int);
1850
1851
1852extern pid_t wait3(int *, int, struct rusage *);
1853
1854
1855
1856
1857extern pid_t wait4(pid_t, int *, int, struct rusage *);
1858# 117 "/usr/include/sys/wait.h" 3 4
1859}
1860# 23 "/usr/include/stdlib.h" 2 3 4
1861# 64 "/usr/include/stdlib.h" 3 4
1862extern "C" {
1863# 103 "/usr/include/stdlib.h" 3 4
1864extern int rand_r(unsigned int *);
1865
1866
1867extern void _exithandle(void);
1868
1869
1870
1871
1872extern double drand48(void);
1873extern double erand48(unsigned short *);
1874extern long jrand48(unsigned short *);
1875extern void lcong48(unsigned short *);
1876extern long lrand48(void);
1877extern long mrand48(void);
1878extern long nrand48(unsigned short *);
1879extern unsigned short *seed48(unsigned short *);
1880extern void srand48(long);
1881extern int putenv(char *);
1882extern void setkey(const char *);
1883# 150 "/usr/include/stdlib.h" 3 4
1884extern int mkstemp(char *);
1885
1886
1887
1888
1889extern int mkstemp64(char *);
1890
1891
1892
1893
1894
1895extern long a64l(const char *);
1896extern char *ecvt(double, int, int *restrict, int *restrict);
1897extern char *fcvt(double, int, int *restrict, int *restrict);
1898extern char *gcvt(double, int, char *);
1899extern int getsubopt(char **, char *const *, char **);
1900extern int grantpt(int);
1901extern char *initstate(unsigned, char *, size_t);
1902extern char *l64a(long);
1903extern char *mktemp(char *);
1904extern char *ptsname(int);
1905extern long random(void);
1906extern char *realpath(const char *restrict, char *restrict);
1907extern char *setstate(const char *);
1908extern void srandom(unsigned);
1909extern int unlockpt(int);
1910
1911
1912extern int ttyslot(void);
1913extern void *valloc(size_t);
1914
1915
1916
1917
1918
1919
1920extern int posix_openpt(int);
1921extern int setenv(const char *, const char *, int);
1922extern int unsetenv(const char *);
1923
1924
1925
1926
1927extern void closefrom(int);
1928extern int dup2(int, int);
1929extern int fdwalk(int (*)(void *, int), void *);
1930extern char *qecvt(long double, int, int *, int *);
1931extern char *qfcvt(long double, int, int *, int *);
1932extern char *qgcvt(long double, int, char *);
1933extern char *getcwd(char *, size_t);
1934extern const char *getexecname(void);
1935extern char *getlogin(void);
1936extern int getopt(int, char *const *, const char *);
1937extern char *optarg;
1938extern int optind, opterr, optopt;
1939extern char *getpass(const char *);
1940extern char *getpassphrase(const char *);
1941extern int getpw(uid_t, char *);
1942extern int isatty(int);
1943extern void *memalign(size_t, size_t);
1944extern char *ttyname(int);
1945
1946
1947extern char *lltostr(long long, char *);
1948extern char *ulltostr(unsigned long long, char *);
1949# 315 "/usr/include/stdlib.h" 3 4
1950}
1951# 16 "../omalloc/omalloc.h" 2
1952
1953
1954
1955
1956extern "C" {
1957# 374 "../omalloc/omalloc.h"
1958enum omError_e
1959{
1960  omError_NoError = 0,
1961  omError_Unknown,
1962  omError_InternalBug,
1963  omError_MemoryCorrupted,
1964  omError_NullAddr,
1965  omError_InvalidRangeAddr,
1966  omError_FalseAddr,
1967  omError_FalseAddrOrMemoryCorrupted,
1968  omError_WrongSize,
1969  omError_FreedAddr,
1970  omError_FreedAddrOrMemoryCorrupted,
1971  omError_WrongBin,
1972  omError_UnknownBin,
1973  omError_NotBinAddr,
1974  omError_UnalignedAddr,
1975  omError_NullSizeAlloc,
1976  omError_ListCycleError,
1977  omError_SortedListError,
1978  omError_KeptAddrListCorrupted,
1979  omError_FreePattern,
1980  omError_BackPattern,
1981  omError_FrontPattern,
1982  omError_NotString,
1983  omError_StickyBin,
1984  omError_MaxError
1985};
1986typedef enum omError_e omError_t;
1987
1988
1989extern omError_t om_ErrorStatus;
1990
1991extern omError_t om_InternalErrorStatus;
1992
1993const char* omError2String(omError_t error);
1994
1995const char* omError2Serror(omError_t error);
1996extern omError_t omReportError(omError_t error, omError_t report_error, const void* r,
1997                               const char* fmt, ...);
1998
1999
2000extern void omErrorBreak();
2001# 469 "../omalloc/omalloc.h"
2002struct omBin_s;
2003typedef struct omBin_s omBin_t;
2004typedef omBin_t* omBin;
2005
2006struct omBinPage_s;
2007typedef struct omBinPage_s omBinPage_t;
2008typedef omBinPage_t* omBinPage;
2009
2010struct omBinPageRegion_s;
2011typedef struct omBinPageRegion_s omBinPageRegion_t;
2012typedef omBinPageRegion_t* omBinPageRegion;
2013
2014struct omOpts_s;
2015typedef struct omOpts_s omOpts_t;
2016
2017struct omInfo_s;
2018typedef struct omInfo_s omInfo_t;
2019
2020struct omSpecBin_s;
2021typedef struct omSpecBin_s omSpecBin_t;
2022typedef omSpecBin_t* omSpecBin;
2023
2024struct omRetInfo_s;
2025typedef struct omRetInfo_s omRetInfo_t;
2026typedef omRetInfo_t* omRetInfo;
2027# 941 "../omalloc/omalloc.h"
2028static inline omBin omGetBinOfPage(omBinPage page);
2029static inline int _omIsBinPageAddr(const void* addr);
2030
2031static inline void* _omAllocBin(omBin bin);
2032static inline void* _omAlloc0Bin(omBin bin);
2033static inline void* _omReallocBin(void* addr, omBin old_bin, omBin new_bin);
2034static inline void* _omRealloc0Bin(void* addr, omBin old_bin, omBin new_bin);
2035
2036static inline void* _omAlloc(size_t size);
2037static inline void* _omAlloc0(size_t size);
2038static inline void* _omReallocSize(void* addr, size_t old_size, size_t new_size);
2039static inline void* _omRealloc0Size(void* addr, size_t old_size, size_t new_size);
2040static inline void* _omRealloc(void* addr, size_t size);
2041static inline void* _omRealloc0(void* addr, size_t size);
2042
2043static inline void* _omalloc(size_t size);
2044static inline void* _omalloc0(size_t size);
2045static inline void* _omreallocSize(void* addr, size_t old_size, size_t new_size);
2046static inline void* _omrealloc0Size(void* addr, size_t old_size, size_t new_size);
2047static inline void* _omrealloc(void* addr, size_t size);
2048static inline void* _omrealloc0(void* addr, size_t size);
2049
2050static inline char* _omStrDup(const char* s);
2051static inline void* _omMemDup(void* addr);
2052# 991 "../omalloc/omalloc.h"
2053omBin _omGetSpecBin(size_t size, int align, int track);
2054
2055
2056
2057void _omUnGetSpecBin(omBin *bin, int force);
2058size_t omGetUsedBinBytes();
2059
2060omBin omGetStickyBinOfBin(omBin bin);
2061void omMergeStickyBinIntoBin(omBin sticky_bin, omBin into_bin);
2062
2063unsigned long omGetNewStickyBinTag(omBin bin);
2064void omSetStickyBinTag(omBin bin, unsigned long sticky);
2065void omUnSetStickyBinTag(omBin bin, unsigned long sticky);
2066void omDeleteStickyBinTag(omBin bin, unsigned long sticky);
2067
2068unsigned long omGetNewStickyAllBinTag();
2069void omSetStickyAllBinTag(unsigned long sticky);
2070void omUnSetStickyAllBinTag(unsigned long sticky);
2071void omDeleteStickyAllBinTag(unsigned long sticky);
2072
2073void omPrintBinStats(FILE* fd);
2074# 1244 "../omalloc/omalloc.h"
2075int _omListLength(void* list, int next);
2076
2077void* _omListLast(void* list, int next);
2078
2079
2080
2081void* _omListHasCycle(void* list, int next);
2082
2083
2084void* _omIsOnList(void* list, int next, void* addr);
2085
2086void* _omRemoveFromList(void* list, int next, void* addr);
2087
2088
2089
2090
2091void* _omFindInList(void* list, int next, int long_field,
2092                    unsigned long what);
2093
2094
2095
2096
2097void* _omFindInSortedList(void* list, int next, int long_field,
2098                          unsigned long what);
2099
2100void* _omRemoveFromSortedList(void* list,int next,int long_field,
2101                                  void* addr);
2102
2103void* _omInsertInSortedList(void* list, int next, int long_field,
2104                            void* addr);
2105# 1362 "../omalloc/omalloc.h"
2106char* omFindExec(const char* prog, char* exec);
2107# 1399 "../omalloc/omalloc.h"
2108struct omRetInfo_s
2109{
2110  void* addr;
2111  char func[200];
2112  char file[200];
2113  int line;
2114};
2115# 1481 "../omalloc/omalloc.h"
2116struct omInfo_s
2117{
2118  long MaxBytesSystem;
2119  long CurrentBytesSystem;
2120  long MaxBytesSbrk;
2121  long CurrentBytesSbrk;
2122  long MaxBytesMmap;
2123  long CurrentBytesMmap;
2124  long UsedBytes;
2125  long AvailBytes;
2126  long UsedBytesMalloc;
2127  long AvailBytesMalloc;
2128  long MaxBytesFromMalloc;
2129  long CurrentBytesFromMalloc;
2130  long MaxBytesFromValloc;
2131  long CurrentBytesFromValloc;
2132  long UsedBytesFromValloc;
2133  long AvailBytesFromValloc;
2134  long MaxPages;
2135  long UsedPages;
2136  long AvailPages;
2137  long MaxRegionsAlloc;
2138  long CurrentRegionsAlloc;
2139};
2140
2141
2142extern struct omInfo_s omGetInfo();
2143
2144
2145extern struct omInfo_s om_Info;
2146
2147extern void omUpdateInfo();
2148
2149extern void omInitInfo();
2150extern void omPrintStats(FILE* fd);
2151extern void omPrintInfo(FILE* fd);
2152
2153
2154
2155extern unsigned long om_SbrkInit;
2156# 1536 "../omalloc/omalloc.h"
2157struct omOpts_s
2158{
2159  int MinTrack;
2160  int MinCheck;
2161  int MaxTrack;
2162  int MaxCheck;
2163  int Keep;
2164  int HowToReportErrors;
2165  int MarkAsStatic;
2166  unsigned int PagesPerRegion;
2167  void (*OutOfMemoryFunc)();
2168  void (*MemoryLowFunc)();
2169  void (*ErrorHook)();
2170};
2171extern omOpts_t om_Opts;
2172# 1609 "../omalloc/omalloc.h"
2173extern unsigned long om_MaxBinPageIndex;
2174extern unsigned long om_MinBinPageIndex;
2175extern unsigned long *om_BinPageIndicies;
2176# 1639 "../omalloc/omalloc.h"
2177extern omBinPage omAllocBinPages(int how_many);
2178extern omBinPage omAllocBinPage();
2179
2180extern void omFreeBinPages(omBinPage page, int how_many);
2181# 1660 "../omalloc/omalloc.h"
2182size_t omSizeOfAddr(const void* addr);
2183size_t omSizeWOfAddr(void* addr);
2184
2185size_t omSizeOfLargeAddr(void* addr);
2186
2187
2188void* omAllocFromSystem(size_t size);
2189void* omReallocFromSystem(void* addr, size_t newsize);
2190void omFreeToSystem(void* addr);
2191
2192void* omReallocSizeFromSystem(void* addr, size_t oldsize, size_t newsize);
2193void omFreeSizeToSystem(void* addr, size_t size);
2194
2195
2196void* _omVallocFromSystem(size_t size, int fail);
2197void omVfreeToSystem(void* page, size_t size);
2198
2199
2200
2201
2202
2203
2204
2205void* omAllocLarge(size_t size);
2206void* omReallocLarge(void* old_addr, size_t new_size);
2207void omFreeLarge(void* addr);
2208
2209void* omRealloc0Large(void* old_addr, size_t new_size);
2210void* omAlloc0Large(size_t size);
2211# 1718 "../omalloc/omalloc.h"
2212struct omBinPage_s
2213{
2214  long used_blocks;
2215  void* current;
2216  omBinPage next;
2217  omBinPage prev;
2218  void* bin_sticky;
2219
2220  omBinPageRegion region;
2221};
2222# 1736 "../omalloc/omalloc.h"
2223struct omBin_s
2224{
2225  omBinPage current_page;
2226  omBinPage last_page;
2227  omBin next;
2228  size_t sizeW;
2229  long max_blocks;
2230
2231  unsigned long sticky;
2232};
2233
2234struct omSpecBin_s
2235{
2236  omSpecBin next;
2237  omBin bin;
2238  long max_blocks;
2239  long ref;
2240};
2241
2242extern omSpecBin om_SpecBin;
2243extern omBin om_StickyBins;
2244extern omBinPage_t om_ZeroPage[];
2245extern omBin om_Size2Bin[];
2246# 1783 "../omalloc/omalloc.h"
2247extern omBin_t om_StaticBin[];
2248extern omBin om_Size2Bin[];
2249# 1808 "../omalloc/omalloc.h"
2250extern void* omAllocBinFromFullPage(omBin bin);
2251extern void omFreeToPageFault(omBinPage page, void* addr);
2252# 2010 "../omalloc/omalloc.h"
2253void* omDoRealloc(void* old_addr, size_t new_size, int flags);
2254# 2287 "../omalloc/omalloc.h"
2255static inline omBin omGetBinOfPage(omBinPage page)
2256{
2257  unsigned long sticky = (((unsigned long) ((page)->bin_sticky)) & ((unsigned long)4 -1));
2258  omBin bin = ((omBin) ( ((unsigned long) ((page)->bin_sticky)) & ~((unsigned long)4 - 1)));
2259
2260  if (! (bin->sticky >= 4))
2261  {
2262    while (bin->sticky != sticky && bin->next != (0))
2263    {
2264      bin = bin->next;
2265    }
2266  }
2267  return bin;
2268}
2269
2270static inline int _omIsBinPageAddr(const void* addr)
2271{
2272  unsigned long index = (((unsigned long) addr) >> (5 + 13));
2273  if (index >= om_MinBinPageIndex && index <= om_MaxBinPageIndex)
2274  {
2275    unsigned long shift = ((((unsigned long) addr) & ((((unsigned long) 8192) << 5) -1)) >> 13);
2276    return ((om_BinPageIndicies[index - om_MinBinPageIndex] & (((unsigned long) 1) << shift)) != 0L);
2277  }
2278  return 0;
2279}
2280
2281static inline void* _omAllocBin(omBin bin)
2282{
2283  void* addr;
2284  do { register omBinPage __om_page = (bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(bin); } while (0);
2285  return addr;
2286}
2287static inline void* _omAlloc0Bin(omBin bin)
2288{
2289  void* addr;
2290  do { do { register omBinPage __om_page = (bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(bin); } while (0); do { long* _p1 = (long*) (addr); unsigned long _l = (bin)->sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); } while (0);
2291  return addr;
2292}
2293static inline void* _omReallocBin(void* addr, omBin old_bin, omBin new_bin)
2294{
2295  void* new_addr;
2296  do { if (old_bin != new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(new_bin); } while (0); do { long _i = (new_bin->sizeW > old_sizeW ? old_sizeW : new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0);
2297  return new_addr;
2298}
2299static inline void* _omRealloc0Bin(void* addr, omBin old_bin, omBin new_bin)
2300{
2301  void* new_addr;
2302  do { if (old_bin != new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(new_bin); } while (0); do { long _i = (new_bin->sizeW > old_sizeW ? old_sizeW : new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); if (new_bin->sizeW > old_sizeW) do { long* _p1 = (long*) ((void**)new_addr + old_sizeW); unsigned long _l = new_bin->sizeW - old_sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0);
2303  return new_addr;
2304}
2305
2306
2307static inline void* _omAlloc(size_t size)
2308{
2309  void* addr;
2310  do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { addr = (void*) omAllocLarge(__size); } } while(0);
2311  return addr;
2312}
2313static inline void* _omAlloc0(size_t size)
2314{
2315  void* addr;
2316  do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); do { long* _p1 = (long*) (addr); unsigned long _l = (__om_bin)->sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); } while (0); } else { addr = (void*) omAlloc0Large(__size); } } while (0);
2317  return addr;
2318}
2319static inline void* _omReallocSize(void* addr, size_t old_size, size_t new_size)
2320{
2321  void* new_addr;
2322  do { size_t __new_size = new_size; if (__new_size <= 1016 && old_size <= 1016) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 0); } } while (0);
2323  return new_addr;
2324}
2325static inline void* _omRealloc0Size(void* addr, size_t old_size, size_t new_size)
2326{
2327  void* new_addr;
2328  do { size_t __new_size = new_size; if (__new_size <= 1016 && old_size <= 1016) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); if (__new_bin->sizeW > old_sizeW) do { long* _p1 = (long*) ((void**)new_addr + old_sizeW); unsigned long _l = __new_bin->sizeW - old_sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 1); } } while (0);
2329  return new_addr;
2330}
2331static inline void* _omRealloc(void* addr, size_t size)
2332{
2333  void* new_addr;
2334  do { size_t __new_size = size; if (__new_size <= 1016 && _omIsBinPageAddr(addr)) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 0); } } while (0);
2335  return new_addr;
2336}
2337static inline void* _omRealloc0(void* addr, size_t size)
2338{
2339  void* new_addr;
2340  do { size_t __new_size = size; if (__new_size <= 1016 && _omIsBinPageAddr(addr)) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); if (__new_bin->sizeW > old_sizeW) do { long* _p1 = (long*) ((void**)new_addr + old_sizeW); unsigned long _l = __new_bin->sizeW - old_sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 1); } } while (0);
2341  return new_addr;
2342}
2343# 2425 "../omalloc/omalloc.h"
2344static inline char* _omStrDup(const char* s)
2345{
2346  void* r;
2347  size_t i=(size_t)0;
2348
2349  while (s[i]) i++;
2350  i++;
2351  do { size_t __size = i; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; r = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else r = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { r = (void*) omAllocLarge(__size); } } while(0);
2352  memcpy(r, (void*) s, i);
2353  return (char*) r;
2354}
2355
2356static inline void* _omMemDup(void* addr)
2357{
2358  void* r;
2359  if (_omIsBinPageAddr(addr))
2360  {
2361    omBin bin = ((omBin) ( ((unsigned long) ((((omBinPage) ((void*) (((long)addr) & ~(8192 -1)))))->bin_sticky)) & ~((unsigned long)4 - 1)));
2362    do { register omBinPage __om_page = (bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; r = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else r = (void*) omAllocBinFromFullPage(bin); } while (0);
2363    do { long _i = bin->sizeW; long* _s1 = (long*) (r); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0);
2364  }
2365  else
2366  {
2367    size_t size = omSizeWOfAddr(addr);
2368    do { size_t __size = size << 2; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; r = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else r = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { r = (void*) omAllocLarge(__size); } } while(0);
2369    do { long _i = size; long* _s1 = (long*) (r); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0);
2370  }
2371  return r;
2372}
2373
2374static inline void* _omalloc(size_t size)
2375{
2376  void* addr;
2377  if (! size) size = (size_t)1;
2378  do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { addr = (void*) omAllocLarge(__size); } } while(0);
2379  return addr;
2380}
2381
2382static inline void* _omalloc0(size_t size)
2383{
2384  void* addr;
2385  if (! size) size = (size_t)1;
2386  do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); do { long* _p1 = (long*) (addr); unsigned long _l = (__om_bin)->sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); } while (0); } else { addr = (void*) omAlloc0Large(__size); } } while (0);
2387  return addr;
2388}
2389
2390static inline void* _omreallocSize(void* addr, size_t old_size, size_t new_size)
2391{
2392  void* new_addr;
2393
2394  if (!new_size) new_size = (size_t)1;
2395  if (addr != (0))
2396  {
2397    do { size_t __new_size = new_size; if (__new_size <= 1016 && old_size <= 1016) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 0); } } while (0);
2398  }
2399  else
2400  {
2401    do { size_t __size = new_size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { new_addr = (void*) omAllocLarge(__size); } } while(0);
2402  }
2403  return new_addr;
2404}
2405
2406static inline void* _omrealloc0Size(void* addr, size_t old_size, size_t new_size)
2407{
2408  void* new_addr;
2409
2410  if (!new_size) new_size = (size_t)1;
2411  if (addr != (0) && old_size > ((size_t)0))
2412  {
2413    do { size_t __new_size = new_size; if (__new_size <= 1016 && old_size <= 1016) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); if (__new_bin->sizeW > old_sizeW) do { long* _p1 = (long*) ((void**)new_addr + old_sizeW); unsigned long _l = __new_bin->sizeW - old_sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 1); } } while (0);
2414  }
2415  else
2416  {
2417    do { size_t __size = new_size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); do { long* _p1 = (long*) (new_addr); unsigned long _l = (__om_bin)->sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); } while (0); } else { new_addr = (void*) omAlloc0Large(__size); } } while (0);
2418  }
2419  return new_addr;
2420}
2421
2422static inline void* _omrealloc(void* addr, size_t size)
2423{
2424  void* new_addr;
2425
2426  if (!size) size = (size_t)1;
2427  if (addr != (0))
2428  {
2429    do { size_t __new_size = size; if (__new_size <= 1016 && _omIsBinPageAddr(addr)) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 0); } } while (0);
2430  }
2431  else
2432  {
2433    do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); } else { new_addr = (void*) omAllocLarge(__size); } } while(0);
2434  }
2435  return new_addr;
2436}
2437
2438static inline void* _omrealloc0(void* addr, size_t size)
2439{
2440  void* new_addr;
2441
2442  if (!size) size = (size_t)1;
2443  if (addr != (0))
2444  {
2445    do { size_t __new_size = size; if (__new_size <= 1016 && _omIsBinPageAddr(addr)) { omBin __old_bin = omGetBinOfPage(((omBinPage) ((long) (addr) & ~(8192 -1)))); omBin __new_bin = om_Size2Bin[((__new_size) -1)>>3]; do { if (__old_bin != __new_bin) { size_t old_sizeW = (_omIsBinPageAddr(addr) ? __old_bin->sizeW : omSizeWOfAddr(addr)); do { register omBinPage __om_page = (__new_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__new_bin); } while (0); do { long _i = (__new_bin->sizeW > old_sizeW ? old_sizeW : __new_bin->sizeW); long* _s1 = (long*) (new_addr); const long* _s2 = (long*) (addr); for (;;) { *_s1 = *_s2; _i--; if (_i == 0) break; _s1++; _s2++; } } while(0); if (__new_bin->sizeW > old_sizeW) do { long* _p1 = (long*) ((void**)new_addr + old_sizeW); unsigned long _l = __new_bin->sizeW - old_sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); do { register void* __om_addr = (void*) (addr); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { new_addr = (void*) addr; } } while (0); } else { new_addr = (void*) omDoRealloc(addr, __new_size, 1); } } while (0);
2446  }
2447  else
2448  {
2449    do { size_t __size = size; if (__size <= 1016) { omBin __om_bin = om_Size2Bin[((__size) -1)>>3]; do { do { register omBinPage __om_page = (__om_bin)->current_page; if (__om_page->current != (0)) do { ((__om_page)->used_blocks)++; new_addr = (void*)((__om_page)->current); (__om_page)->current = *((void**) (__om_page)->current); } while (0); else new_addr = (void*) omAllocBinFromFullPage(__om_bin); } while (0); do { long* _p1 = (long*) (new_addr); unsigned long _l = (__om_bin)->sizeW; unsigned long _w = 0; while(_l) { *_p1++ = _w; _l--; } } while(0); } while (0); } else { new_addr = (void*) omAlloc0Large(__size); } } while (0);
2450  }
2451  return new_addr;
2452}
2453# 2549 "../omalloc/omalloc.h"
2454void* omCallocFunc(size_t nmemb, size_t size);
2455void* omMallocFunc(size_t size);
2456void omFreeFunc(void* addr);
2457void* omVallocFunc(size_t size);
2458
2459
2460
2461
2462extern void* omMemalignFunc(size_t, size_t);
2463
2464
2465
2466
2467void* omReallocFunc(void* old_addr, size_t new_size);
2468char* omStrdupFunc(const char* addr);
2469void* omReallocSizeFunc(void* old_addr, size_t old_size, size_t new_size);
2470void omFreeSizeFunc(void* addr, size_t size);
2471
2472
2473}
2474# 14 "../kernel/structs.h" 2
2475
2476# 1 "../kernel/si_gmp.h" 1
2477
2478
2479
2480# 1 "../factory/cf_gmp.h" 1
2481# 31 "../factory/cf_gmp.h"
2482# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 1 3
2483# 38 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 3
2484       
2485# 39 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 3
2486
2487# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/c++config.h" 1 3
2488# 153 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/c++config.h" 3
2489namespace std
2490{
2491  typedef unsigned int size_t;
2492  typedef int ptrdiff_t;
2493
2494
2495
2496
2497}
2498# 393 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/c++config.h" 3
2499# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/os_defines.h" 1 3
2500# 394 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/c++config.h" 2 3
2501
2502
2503# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/cpu_defines.h" 1 3
2504# 397 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/sparc-sun-solaris2.10/bits/c++config.h" 2 3
2505# 41 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 2 3
2506# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 1 3
2507# 39 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 3
2508       
2509# 40 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 3
2510
2511
2512
2513namespace std __attribute__ ((__visibility__ ("default")))
2514{
2515
2516
2517  template<typename _Alloc>
2518    class allocator;
2519
2520
2521
2522
2523
2524
2525
2526  template<class _CharT>
2527    struct char_traits;
2528
2529  template<typename _CharT, typename _Traits = char_traits<_CharT>,
2530           typename _Alloc = allocator<_CharT> >
2531    class basic_string;
2532
2533  template<> struct char_traits<char>;
2534
2535  typedef basic_string<char> string;
2536
2537
2538  template<> struct char_traits<wchar_t>;
2539
2540  typedef basic_string<wchar_t> wstring;
2541# 85 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 3
2542
2543}
2544# 42 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 2 3
2545# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 1 3
2546# 40 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
2547       
2548# 41 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
2549
2550# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 1 3
2551# 41 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 3
2552       
2553# 42 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 3
2554
2555
2556
2557
2558# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 1 3 4
2559# 18 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 3 4
2560#pragma ident "@(#)wchar.h      1.37    03/12/04 SMI"
2561
2562
2563
2564# 1 "/usr/include/iso/wchar_iso.h" 1 3 4
2565# 21 "/usr/include/iso/wchar_iso.h" 3 4
2566#pragma ident "@(#)wchar_iso.h  1.8     04/09/28 SMI"
2567
2568
2569
2570# 1 "/usr/include/wchar_impl.h" 1 3 4
2571# 9 "/usr/include/wchar_impl.h" 3 4
2572#pragma ident "@(#)wchar_impl.h 1.3     99/07/26 SMI"
2573
2574
2575
2576
2577extern "C" {
2578
2579
2580
2581
2582typedef struct __mbstate_t {
2583
2584
2585
2586 int __filler[6];
2587
2588} __mbstate_t;
2589
2590
2591
2592}
2593# 26 "/usr/include/iso/wchar_iso.h" 2 3 4
2594# 35 "/usr/include/iso/wchar_iso.h" 3 4
2595# 1 "/usr/include/ctype.h" 1 3 4
2596# 16 "/usr/include/ctype.h" 3 4
2597#pragma ident "@(#)ctype.h      1.35    04/09/28 SMI"
2598
2599# 1 "/usr/include/iso/ctype_iso.h" 1 3 4
2600# 28 "/usr/include/iso/ctype_iso.h" 3 4
2601#pragma ident "@(#)ctype_iso.h  1.3     04/09/28 SMI"
2602
2603
2604
2605
2606extern "C" {
2607# 63 "/usr/include/iso/ctype_iso.h" 3 4
2608extern int isalnum(int);
2609extern int isalpha(int);
2610extern int iscntrl(int);
2611extern int isdigit(int);
2612extern int isgraph(int);
2613extern int islower(int);
2614extern int isprint(int);
2615extern int ispunct(int);
2616extern int isspace(int);
2617extern int isupper(int);
2618extern int isxdigit(int);
2619
2620
2621
2622
2623
2624
2625
2626extern int tolower(int);
2627extern int toupper(int);
2628
2629
2630
2631
2632
2633extern unsigned char __ctype[];
2634extern unsigned int *__ctype_mask;
2635extern int *__trans_upper;
2636extern int *__trans_lower;
2637# 184 "/usr/include/iso/ctype_iso.h" 3 4
2638}
2639# 19 "/usr/include/ctype.h" 2 3 4
2640# 1 "/usr/include/iso/ctype_c99.h" 1 3 4
2641# 20 "/usr/include/iso/ctype_c99.h" 3 4
2642#pragma ident "@(#)ctype_c99.h  1.2     04/09/28 SMI"
2643
2644
2645extern "C" {
2646# 38 "/usr/include/iso/ctype_c99.h" 3 4
2647extern int isblank(int);
2648# 62 "/usr/include/iso/ctype_c99.h" 3 4
2649}
2650# 20 "/usr/include/ctype.h" 2 3 4
2651# 42 "/usr/include/ctype.h" 3 4
2652extern "C" {
2653# 51 "/usr/include/ctype.h" 3 4
2654extern int isascii(int);
2655extern int toascii(int);
2656extern int _tolower(int);
2657extern int _toupper(int);
2658# 91 "/usr/include/ctype.h" 3 4
2659}
2660# 36 "/usr/include/iso/wchar_iso.h" 2 3 4
2661# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include/stddef.h" 1 3 4
2662# 37 "/usr/include/iso/wchar_iso.h" 2 3 4
2663
2664
2665
2666
2667
2668extern "C" {
2669# 78 "/usr/include/iso/wchar_iso.h" 3 4
2670typedef long wint_t;
2671# 115 "/usr/include/iso/wchar_iso.h" 3 4
2672typedef __mbstate_t mbstate_t;
2673# 153 "/usr/include/iso/wchar_iso.h" 3 4
2674       
2675# 153 "/usr/include/iso/wchar_iso.h" 3 4
2676#pragma redefine_extname fgetwc __fgetwc_xpg5
2677# 153 "/usr/include/iso/wchar_iso.h" 3 4
2678
2679       
2680# 154 "/usr/include/iso/wchar_iso.h" 3 4
2681#pragma redefine_extname getwc __getwc_xpg5
2682# 154 "/usr/include/iso/wchar_iso.h" 3 4
2683
2684       
2685# 155 "/usr/include/iso/wchar_iso.h" 3 4
2686#pragma redefine_extname getwchar __getwchar_xpg5
2687# 155 "/usr/include/iso/wchar_iso.h" 3 4
2688
2689       
2690# 156 "/usr/include/iso/wchar_iso.h" 3 4
2691#pragma redefine_extname fputwc __fputwc_xpg5
2692# 156 "/usr/include/iso/wchar_iso.h" 3 4
2693
2694       
2695# 157 "/usr/include/iso/wchar_iso.h" 3 4
2696#pragma redefine_extname putwc __putwc_xpg5
2697# 157 "/usr/include/iso/wchar_iso.h" 3 4
2698
2699       
2700# 158 "/usr/include/iso/wchar_iso.h" 3 4
2701#pragma redefine_extname putwchar __putwchar_xpg5
2702# 158 "/usr/include/iso/wchar_iso.h" 3 4
2703
2704       
2705# 159 "/usr/include/iso/wchar_iso.h" 3 4
2706#pragma redefine_extname fgetws __fgetws_xpg5
2707# 159 "/usr/include/iso/wchar_iso.h" 3 4
2708
2709       
2710# 160 "/usr/include/iso/wchar_iso.h" 3 4
2711#pragma redefine_extname fputws __fputws_xpg5
2712# 160 "/usr/include/iso/wchar_iso.h" 3 4
2713
2714       
2715# 161 "/usr/include/iso/wchar_iso.h" 3 4
2716#pragma redefine_extname ungetwc __ungetwc_xpg5
2717# 161 "/usr/include/iso/wchar_iso.h" 3 4
2718# 200 "/usr/include/iso/wchar_iso.h" 3 4
2719extern wint_t fgetwc(__FILE *);
2720extern wchar_t *fgetws(wchar_t *restrict, int, __FILE *restrict);
2721extern wint_t fputwc(wint_t, __FILE *);
2722extern int fputws(const wchar_t *restrict, __FILE *restrict);
2723extern wint_t ungetwc(wint_t, __FILE *);
2724extern wint_t getwc(__FILE *);
2725extern wint_t getwchar(void);
2726extern wint_t putwc(wint_t, __FILE *);
2727extern wint_t putwchar(wint_t);
2728extern double wcstod(const wchar_t *restrict, wchar_t **restrict);
2729extern long wcstol(const wchar_t *restrict, wchar_t **restrict,
2730 int);
2731extern unsigned long wcstoul(const wchar_t *restrict,
2732 wchar_t **restrict, int);
2733extern wchar_t *wcscat(wchar_t *restrict, const wchar_t *restrict);
2734extern int wcscmp(const wchar_t *, const wchar_t *);
2735extern int wcscoll(const wchar_t *, const wchar_t *);
2736extern wchar_t *wcscpy(wchar_t *restrict, const wchar_t *restrict);
2737extern size_t wcscspn(const wchar_t *, const wchar_t *);
2738extern size_t wcslen(const wchar_t *);
2739extern wchar_t *wcsncat(wchar_t *restrict, const wchar_t *restrict,
2740 size_t);
2741extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
2742extern wchar_t *wcsncpy(wchar_t *restrict, const wchar_t *restrict,
2743 size_t);
2744extern size_t wcsspn(const wchar_t *, const wchar_t *);
2745extern size_t wcsxfrm(wchar_t *restrict, const wchar_t *restrict,
2746 size_t);
2747# 248 "/usr/include/iso/wchar_iso.h" 3 4
2748extern wchar_t *wcschr(const wchar_t *, wchar_t);
2749extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
2750extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
2751# 259 "/usr/include/iso/wchar_iso.h" 3 4
2752       
2753# 259 "/usr/include/iso/wchar_iso.h" 3 4
2754#pragma redefine_extname wcstok __wcstok_xpg5
2755# 259 "/usr/include/iso/wchar_iso.h" 3 4
2756
2757       
2758# 260 "/usr/include/iso/wchar_iso.h" 3 4
2759#pragma redefine_extname wcsftime __wcsftime_xpg5
2760# 260 "/usr/include/iso/wchar_iso.h" 3 4
2761
2762extern wchar_t *wcstok(wchar_t *restrict, const wchar_t *restrict,
2763 wchar_t **restrict);
2764extern size_t wcsftime(wchar_t *restrict, size_t,
2765 const wchar_t *restrict, const struct tm *restrict);
2766# 278 "/usr/include/iso/wchar_iso.h" 3 4
2767extern wint_t btowc(int);
2768extern int fwprintf(__FILE *restrict, const wchar_t *restrict,
2769   ...);
2770extern int fwscanf(__FILE *restrict, const wchar_t *restrict,
2771   ...);
2772extern int fwide(__FILE *, int);
2773extern int mbsinit(const mbstate_t *);
2774extern size_t mbrlen(const char *restrict, size_t,
2775   mbstate_t *restrict);
2776extern size_t mbrtowc(wchar_t *restrict, const char *restrict,
2777   size_t, mbstate_t *restrict);
2778extern size_t mbsrtowcs(wchar_t *restrict, const char **restrict,
2779   size_t, mbstate_t *restrict);
2780extern int swprintf(wchar_t *restrict, size_t,
2781   const wchar_t *restrict, ...);
2782extern int swscanf(const wchar_t *restrict,
2783   const wchar_t *restrict, ...);
2784extern int vfwprintf(__FILE *restrict, const wchar_t *restrict,
2785   __va_list);
2786extern int vwprintf(const wchar_t *restrict, __va_list);
2787extern int vswprintf(wchar_t *restrict, size_t,
2788   const wchar_t *restrict, __va_list);
2789extern size_t wcrtomb(char *restrict, wchar_t,
2790   mbstate_t *restrict);
2791extern size_t wcsrtombs(char *restrict, const wchar_t **restrict,
2792   size_t, mbstate_t *restrict);
2793extern int wctob(wint_t);
2794extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
2795extern wchar_t *wmemcpy(wchar_t *restrict,
2796   const wchar_t *restrict, size_t);
2797extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
2798extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
2799extern int wprintf(const wchar_t *restrict, ...);
2800extern int wscanf(const wchar_t *restrict, ...);
2801# 326 "/usr/include/iso/wchar_iso.h" 3 4
2802extern wchar_t *wcsstr(const wchar_t *restrict,
2803 const wchar_t *restrict);
2804extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
2805# 416 "/usr/include/iso/wchar_iso.h" 3 4
2806}
2807# 23 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 2 3 4
2808# 1 "/usr/include/iso/wchar_c99.h" 1 3 4
2809# 20 "/usr/include/iso/wchar_c99.h" 3 4
2810#pragma ident "@(#)wchar_c99.h  1.3     04/03/29 SMI"
2811
2812
2813extern "C" {
2814# 45 "/usr/include/iso/wchar_c99.h" 3 4
2815extern int vfwscanf(__FILE *restrict, const wchar_t *restrict,
2816  __va_list);
2817extern int vswscanf(const wchar_t *restrict,
2818  const wchar_t *restrict, __va_list);
2819extern int vwscanf(const wchar_t *restrict, __va_list);
2820extern float wcstof(const wchar_t *restrict,
2821  wchar_t **restrict);
2822
2823extern long double wcstold(const wchar_t *restrict,
2824  wchar_t **restrict);
2825extern long long wcstoll(const wchar_t *restrict,
2826  wchar_t **restrict, int);
2827extern unsigned long long wcstoull(const wchar_t *restrict,
2828  wchar_t **restrict, int);
2829# 78 "/usr/include/iso/wchar_c99.h" 3 4
2830}
2831# 24 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 2 3 4
2832# 95 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 3 4
2833extern "C" {
2834
2835
2836
2837
2838
2839typedef int wctype_t;
2840# 111 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 3 4
2841typedef __va_list __not_va_list__;
2842
2843
2844
2845
2846
2847extern int iswalpha(wint_t);
2848extern int iswupper(wint_t);
2849extern int iswlower(wint_t);
2850extern int iswdigit(wint_t);
2851extern int iswxdigit(wint_t);
2852extern int iswalnum(wint_t);
2853extern int iswspace(wint_t);
2854extern int iswpunct(wint_t);
2855extern int iswprint(wint_t);
2856extern int iswgraph(wint_t);
2857extern int iswcntrl(wint_t);
2858extern int iswctype(wint_t, wctype_t);
2859extern wint_t towlower(wint_t);
2860extern wint_t towupper(wint_t);
2861extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
2862extern int wcswidth(const wchar_t *, size_t);
2863extern int wcwidth(const wchar_t);
2864extern wctype_t wctype(const char *);
2865# 163 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/wchar.h" 3 4
2866}
2867# 47 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 2 3
2868# 64 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 3
2869namespace std
2870{
2871  using ::mbstate_t;
2872}
2873# 137 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 3
2874namespace std __attribute__ ((__visibility__ ("default")))
2875{
2876
2877
2878  using ::wint_t;
2879
2880  using ::btowc;
2881  using ::fgetwc;
2882  using ::fgetws;
2883  using ::fputwc;
2884  using ::fputws;
2885  using ::fwide;
2886  using ::fwprintf;
2887  using ::fwscanf;
2888  using ::getwc;
2889  using ::getwchar;
2890  using ::mbrlen;
2891  using ::mbrtowc;
2892  using ::mbsinit;
2893  using ::mbsrtowcs;
2894  using ::putwc;
2895  using ::putwchar;
2896
2897  using ::swprintf;
2898
2899  using ::swscanf;
2900  using ::ungetwc;
2901  using ::vfwprintf;
2902
2903  using ::vfwscanf;
2904
2905
2906  using ::vswprintf;
2907
2908
2909  using ::vswscanf;
2910
2911  using ::vwprintf;
2912
2913  using ::vwscanf;
2914
2915  using ::wcrtomb;
2916  using ::wcscat;
2917  using ::wcscmp;
2918  using ::wcscoll;
2919  using ::wcscpy;
2920  using ::wcscspn;
2921  using ::wcsftime;
2922  using ::wcslen;
2923  using ::wcsncat;
2924  using ::wcsncmp;
2925  using ::wcsncpy;
2926  using ::wcsrtombs;
2927  using ::wcsspn;
2928  using ::wcstod;
2929
2930  using ::wcstof;
2931
2932  using ::wcstok;
2933  using ::wcstol;
2934  using ::wcstoul;
2935  using ::wcsxfrm;
2936  using ::wctob;
2937  using ::wmemcmp;
2938  using ::wmemcpy;
2939  using ::wmemmove;
2940  using ::wmemset;
2941  using ::wprintf;
2942  using ::wscanf;
2943  using ::wcschr;
2944  using ::wcspbrk;
2945  using ::wcsrchr;
2946  using ::wcsstr;
2947  using ::wmemchr;
2948
2949
2950  inline wchar_t*
2951  wcschr(wchar_t* __p, wchar_t __c)
2952  { return wcschr(const_cast<const wchar_t*>(__p), __c); }
2953
2954  inline wchar_t*
2955  wcspbrk(wchar_t* __s1, const wchar_t* __s2)
2956  { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
2957
2958  inline wchar_t*
2959  wcsrchr(wchar_t* __p, wchar_t __c)
2960  { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
2961
2962  inline wchar_t*
2963  wcsstr(wchar_t* __s1, const wchar_t* __s2)
2964  { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
2965
2966  inline wchar_t*
2967  wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
2968  { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
2969
2970
2971
2972}
2973
2974
2975
2976
2977
2978
2979
2980namespace __gnu_cxx
2981{
2982
2983
2984
2985
2986
2987  using ::wcstold;
2988# 259 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cwchar" 3
2989  using ::wcstoll;
2990  using ::wcstoull;
2991
2992}
2993
2994namespace std
2995{
2996  using ::__gnu_cxx::wcstold;
2997  using ::__gnu_cxx::wcstoll;
2998  using ::__gnu_cxx::wcstoull;
2999}
3000# 43 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 2 3
3001# 70 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
3002namespace std __attribute__ ((__visibility__ ("default")))
3003{
3004
3005# 92 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
3006  typedef long long streamoff;
3007
3008
3009
3010
3011
3012
3013
3014  typedef ptrdiff_t streamsize;
3015# 113 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
3016  template<typename _StateT>
3017    class fpos
3018    {
3019    private:
3020      streamoff _M_off;
3021      _StateT _M_state;
3022
3023    public:
3024
3025
3026
3027
3028      fpos()
3029      : _M_off(0), _M_state() { }
3030# 135 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
3031      fpos(streamoff __off)
3032      : _M_off(__off), _M_state() { }
3033
3034
3035      operator streamoff() const { return _M_off; }
3036
3037
3038      void
3039      state(_StateT __st)
3040      { _M_state = __st; }
3041
3042
3043      _StateT
3044      state() const
3045      { return _M_state; }
3046
3047
3048
3049
3050
3051      fpos&
3052      operator+=(streamoff __off)
3053      {
3054 _M_off += __off;
3055 return *this;
3056      }
3057
3058
3059
3060
3061
3062      fpos&
3063      operator-=(streamoff __off)
3064      {
3065 _M_off -= __off;
3066 return *this;
3067      }
3068
3069
3070
3071
3072
3073
3074
3075      fpos
3076      operator+(streamoff __off) const
3077      {
3078 fpos __pos(*this);
3079 __pos += __off;
3080 return __pos;
3081      }
3082
3083
3084
3085
3086
3087
3088
3089      fpos
3090      operator-(streamoff __off) const
3091      {
3092 fpos __pos(*this);
3093 __pos -= __off;
3094 return __pos;
3095      }
3096
3097
3098
3099
3100
3101
3102      streamoff
3103      operator-(const fpos& __other) const
3104      { return _M_off - __other._M_off; }
3105    };
3106
3107
3108
3109
3110
3111
3112  template<typename _StateT>
3113    inline bool
3114    operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
3115    { return streamoff(__lhs) == streamoff(__rhs); }
3116
3117  template<typename _StateT>
3118    inline bool
3119    operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
3120    { return streamoff(__lhs) != streamoff(__rhs); }
3121
3122
3123
3124
3125
3126  typedef fpos<mbstate_t> streampos;
3127
3128  typedef fpos<mbstate_t> wstreampos;
3129# 241 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3
3130
3131}
3132# 43 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 2 3
3133
3134namespace std __attribute__ ((__visibility__ ("default")))
3135{
3136
3137# 76 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/iosfwd" 3
3138  class ios_base;
3139
3140  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3141    class basic_ios;
3142
3143  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3144    class basic_streambuf;
3145
3146  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3147    class basic_istream;
3148
3149  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3150    class basic_ostream;
3151
3152  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3153    class basic_iostream;
3154
3155  template<typename _CharT, typename _Traits = char_traits<_CharT>,
3156     typename _Alloc = allocator<_CharT> >
3157    class basic_stringbuf;
3158
3159  template<typename _CharT, typename _Traits = char_traits<_CharT>,
3160    typename _Alloc = allocator<_CharT> >
3161    class basic_istringstream;
3162
3163  template<typename _CharT, typename _Traits = char_traits<_CharT>,
3164    typename _Alloc = allocator<_CharT> >
3165    class basic_ostringstream;
3166
3167  template<typename _CharT, typename _Traits = char_traits<_CharT>,
3168    typename _Alloc = allocator<_CharT> >
3169    class basic_stringstream;
3170
3171  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3172    class basic_filebuf;
3173
3174  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3175    class basic_ifstream;
3176
3177  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3178    class basic_ofstream;
3179
3180  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3181    class basic_fstream;
3182
3183  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3184    class istreambuf_iterator;
3185
3186  template<typename _CharT, typename _Traits = char_traits<_CharT> >
3187    class ostreambuf_iterator;
3188
3189
3190
3191  typedef basic_ios<char> ios;
3192
3193
3194  typedef basic_streambuf<char> streambuf;
3195
3196
3197  typedef basic_istream<char> istream;
3198
3199
3200  typedef basic_ostream<char> ostream;
3201
3202
3203  typedef basic_iostream<char> iostream;
3204
3205
3206  typedef basic_stringbuf<char> stringbuf;
3207
3208
3209  typedef basic_istringstream<char> istringstream;
3210
3211
3212  typedef basic_ostringstream<char> ostringstream;
3213
3214
3215  typedef basic_stringstream<char> stringstream;
3216
3217
3218  typedef basic_filebuf<char> filebuf;
3219
3220
3221  typedef basic_ifstream<char> ifstream;
3222
3223
3224  typedef basic_ofstream<char> ofstream;
3225
3226
3227  typedef basic_fstream<char> fstream;
3228
3229
3230
3231  typedef basic_ios<wchar_t> wios;
3232
3233
3234  typedef basic_streambuf<wchar_t> wstreambuf;
3235
3236
3237  typedef basic_istream<wchar_t> wistream;
3238
3239
3240  typedef basic_ostream<wchar_t> wostream;
3241
3242
3243  typedef basic_iostream<wchar_t> wiostream;
3244
3245
3246  typedef basic_stringbuf<wchar_t> wstringbuf;
3247
3248
3249  typedef basic_istringstream<wchar_t> wistringstream;
3250
3251
3252  typedef basic_ostringstream<wchar_t> wostringstream;
3253
3254
3255  typedef basic_stringstream<wchar_t> wstringstream;
3256
3257
3258  typedef basic_filebuf<wchar_t> wfilebuf;
3259
3260
3261  typedef basic_ifstream<wchar_t> wifstream;
3262
3263
3264  typedef basic_ofstream<wchar_t> wofstream;
3265
3266
3267  typedef basic_fstream<wchar_t> wfstream;
3268
3269
3270
3271
3272}
3273# 32 "../factory/cf_gmp.h" 2
3274# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 1 3
3275# 41 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 3
3276       
3277# 42 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 3
3278# 92 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 3
3279namespace std
3280{
3281  using ::FILE;
3282  using ::fpos_t;
3283
3284  using ::clearerr;
3285  using ::fclose;
3286  using ::feof;
3287  using ::ferror;
3288  using ::fflush;
3289  using ::fgetc;
3290  using ::fgetpos;
3291  using ::fgets;
3292  using ::fopen;
3293  using ::fprintf;
3294  using ::fputc;
3295  using ::fputs;
3296  using ::fread;
3297  using ::freopen;
3298  using ::fscanf;
3299  using ::fseek;
3300  using ::fsetpos;
3301  using ::ftell;
3302  using ::fwrite;
3303  using ::getc;
3304  using ::getchar;
3305  using ::gets;
3306  using ::perror;
3307  using ::printf;
3308  using ::putc;
3309  using ::putchar;
3310  using ::puts;
3311  using ::remove;
3312  using ::rename;
3313  using ::rewind;
3314  using ::scanf;
3315  using ::setbuf;
3316  using ::setvbuf;
3317  using ::sprintf;
3318  using ::sscanf;
3319  using ::tmpfile;
3320  using ::tmpnam;
3321  using ::ungetc;
3322  using ::vfprintf;
3323  using ::vprintf;
3324  using ::vsprintf;
3325}
3326# 148 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 3
3327namespace __gnu_cxx
3328{
3329# 166 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstdio" 3
3330  using ::snprintf;
3331  using ::vfscanf;
3332  using ::vscanf;
3333  using ::vsnprintf;
3334  using ::vsscanf;
3335
3336}
3337
3338namespace std
3339{
3340  using ::__gnu_cxx::snprintf;
3341  using ::__gnu_cxx::vfscanf;
3342  using ::__gnu_cxx::vscanf;
3343  using ::__gnu_cxx::vsnprintf;
3344  using ::__gnu_cxx::vsscanf;
3345}
3346# 33 "../factory/cf_gmp.h" 2
3347# 53 "../factory/cf_gmp.h"
3348# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstddef" 1 3
3349# 41 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstddef" 3
3350       
3351# 42 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstddef" 3
3352
3353
3354# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include/stddef.h" 1 3 4
3355# 44 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/../../../../include/c++/4.6.3/cstddef" 2 3
3356# 54 "../factory/cf_gmp.h" 2
3357# 199 "../factory/cf_gmp.h"
3358typedef unsigned long int mp_limb_t;
3359typedef long int mp_limb_signed_t;
3360# 211 "../factory/cf_gmp.h"
3361typedef unsigned long mpir_ui;
3362typedef long mpir_si;
3363typedef mpir_ui mp_bitcnt_t;
3364# 224 "../factory/cf_gmp.h"
3365typedef struct
3366{
3367  int _mp_alloc;
3368
3369  int _mp_size;
3370
3371
3372  mp_limb_t *_mp_d;
3373} __mpz_struct;
3374
3375
3376
3377typedef __mpz_struct mpz_t[1];
3378
3379typedef mp_limb_t * mp_ptr;
3380typedef const mp_limb_t * mp_srcptr;
3381
3382
3383
3384
3385
3386
3387typedef long int mp_size_t;
3388typedef long int mp_exp_t;
3389
3390
3391typedef struct
3392{
3393  __mpz_struct _mp_num;
3394  __mpz_struct _mp_den;
3395} __mpq_struct;
3396
3397typedef __mpq_struct mpq_t[1];
3398
3399typedef struct
3400{
3401  int _mp_prec;
3402
3403
3404
3405  int _mp_size;
3406
3407
3408  mp_exp_t _mp_exp;
3409  mp_limb_t *_mp_d;
3410} __mpf_struct;
3411
3412typedef __mpf_struct mpf_t[1];
3413
3414
3415typedef enum
3416{
3417  GMP_RAND_ALG_DEFAULT = 0,
3418  GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT
3419} gmp_randalg_t;
3420
3421
3422typedef struct
3423{
3424  mpz_t _mp_seed;
3425  gmp_randalg_t _mp_alg;
3426  union {
3427    void *_mp_lc;
3428  } _mp_algdata;
3429} __gmp_randstate_struct;
3430typedef __gmp_randstate_struct gmp_randstate_t[1];
3431
3432
3433
3434typedef const __mpz_struct *mpz_srcptr;
3435typedef __mpz_struct *mpz_ptr;
3436typedef const __mpf_struct *mpf_srcptr;
3437typedef __mpf_struct *mpf_ptr;
3438typedef const __mpq_struct *mpq_srcptr;
3439typedef __mpq_struct *mpq_ptr;
3440# 536 "../factory/cf_gmp.h"
3441extern "C" {
3442
3443
3444
3445 void __gmp_set_memory_functions (void *(*) (size_t), void *(*) (void *, size_t, size_t), void (*) (void *, size_t))
3446
3447                                      throw ();
3448
3449
3450 void __gmp_get_memory_functions (void *(**) (size_t), void *(**) (void *, size_t, size_t), void (**) (void *, size_t))
3451
3452                                                                   throw ();
3453
3454
3455 extern const int __gmp_bits_per_limb;
3456
3457
3458 extern int __gmp_errno;
3459
3460
3461 extern const char * const __gmp_version;
3462
3463
3464 extern const char * const __mpir_version;
3465
3466
3467
3468
3469
3470 void __gmp_randinit_default (gmp_randstate_t);
3471
3472
3473 void __gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, mpir_ui, mp_bitcnt_t)
3474
3475                          ;
3476
3477
3478 int __gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t);
3479
3480
3481 void __gmp_randinit_mt (gmp_randstate_t);
3482
3483
3484 void __gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *);
3485
3486
3487 void __gmp_randseed (gmp_randstate_t, mpz_srcptr);
3488
3489
3490 void __gmp_randseed_ui (gmp_randstate_t, mpir_ui);
3491
3492
3493 void __gmp_randclear (gmp_randstate_t);
3494
3495
3496 mpir_ui __gmp_urandomb_ui (gmp_randstate_t, mpir_ui);
3497
3498
3499 mpir_ui __gmp_urandomm_ui (gmp_randstate_t, mpir_ui);
3500
3501
3502
3503
3504
3505 int __gmp_asprintf (char **, const char *, ...);
3506
3507
3508
3509 int __gmp_fprintf (FILE *, const char *, ...);
3510# 618 "../factory/cf_gmp.h"
3511 int __gmp_printf (const char *, ...);
3512
3513
3514 int __gmp_snprintf (char *, size_t, const char *, ...);
3515
3516
3517 int __gmp_sprintf (char *, const char *, ...);
3518# 656 "../factory/cf_gmp.h"
3519 int __gmp_fscanf (FILE *, const char *, ...);
3520
3521
3522
3523 int __gmp_scanf (const char *, ...);
3524
3525
3526 int __gmp_sscanf (const char *, const char *, ...);
3527# 685 "../factory/cf_gmp.h"
3528 void *__gmpz_realloc (mpz_ptr, mp_size_t);
3529
3530
3531
3532
3533 void __gmpz_abs (mpz_ptr, mpz_srcptr);
3534
3535
3536
3537
3538 void __gmpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr);
3539
3540
3541
3542 void __gmpz_add_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3543
3544
3545 void __gmpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr);
3546
3547
3548 void __gmpz_addmul_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3549
3550
3551 void __gmpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr);
3552
3553
3554 void __gmpz_array_init (mpz_ptr, mp_size_t, mp_size_t);
3555
3556
3557 void __gmpz_bin_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3558
3559
3560 void __gmpz_bin_uiui (mpz_ptr, mpir_ui, mpir_ui);
3561
3562
3563 void __gmpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
3564
3565
3566 void __gmpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
3567
3568
3569 mpir_ui __gmpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3570
3571
3572 void __gmpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
3573
3574
3575 mpir_ui __gmpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, mpir_ui);
3576
3577
3578 void __gmpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
3579
3580
3581 void __gmpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
3582
3583
3584 mpir_ui __gmpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3585
3586
3587 mpir_ui __gmpz_cdiv_ui (mpz_srcptr, mpir_ui) __attribute__ ((__pure__));
3588
3589
3590 void __gmpz_clear (mpz_ptr);
3591
3592
3593 void __gmpz_clears (mpz_ptr, ...);
3594
3595
3596 void __gmpz_clrbit (mpz_ptr, mp_bitcnt_t);
3597
3598
3599 int __gmpz_cmp (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
3600
3601
3602 int __gmpz_cmp_d (mpz_srcptr, double) __attribute__ ((__pure__));
3603
3604
3605 int __gmpz_cmp_si (mpz_srcptr, mpir_si) throw () __attribute__ ((__pure__));
3606
3607
3608 int __gmpz_cmp_ui (mpz_srcptr, mpir_ui) throw () __attribute__ ((__pure__));
3609
3610
3611 int __gmpz_cmpabs (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
3612
3613
3614 int __gmpz_cmpabs_d (mpz_srcptr, double) __attribute__ ((__pure__));
3615
3616
3617 int __gmpz_cmpabs_ui (mpz_srcptr, mpir_ui) throw () __attribute__ ((__pure__));
3618
3619
3620 void __gmpz_com (mpz_ptr, mpz_srcptr);
3621
3622
3623 void __gmpz_combit (mpz_ptr, mp_bitcnt_t);
3624
3625
3626 int __gmpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
3627
3628
3629 int __gmpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
3630
3631
3632 int __gmpz_congruent_ui_p (mpz_srcptr, mpir_ui, mpir_ui) __attribute__ ((__pure__));
3633
3634
3635 void __gmpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr);
3636
3637
3638 void __gmpz_divexact_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3639
3640
3641 int __gmpz_divisible_p (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
3642
3643
3644 int __gmpz_divisible_ui_p (mpz_srcptr, mpir_ui) __attribute__ ((__pure__));
3645
3646
3647 int __gmpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
3648
3649
3650 void __gmpz_dump (mpz_srcptr);
3651
3652
3653 void *__gmpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr);
3654
3655
3656 void __gmpz_fac_ui (mpz_ptr, mpir_ui);
3657
3658
3659 void __gmpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
3660
3661
3662 void __gmpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
3663
3664
3665 mpir_ui __gmpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3666
3667
3668 void __gmpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
3669
3670
3671 mpir_ui __gmpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, mpir_ui);
3672
3673
3674 void __gmpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
3675
3676
3677 void __gmpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
3678
3679
3680 mpir_ui __gmpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3681
3682
3683 mpir_ui __gmpz_fdiv_ui (mpz_srcptr, mpir_ui) __attribute__ ((__pure__));
3684
3685
3686 void __gmpz_fib_ui (mpz_ptr, mpir_ui);
3687
3688
3689 void __gmpz_fib2_ui (mpz_ptr, mpz_ptr, mpir_ui);
3690
3691
3692 int __gmpz_fits_sint_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3693
3694
3695 int __gmpz_fits_si_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3696
3697
3698 int __gmpz_fits_slong_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3699
3700
3701 int __gmpz_fits_sshort_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3702
3703
3704
3705 int __gmpz_fits_uint_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3706
3707
3708
3709
3710 int __gmpz_fits_ui_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3711
3712
3713
3714
3715 int __gmpz_fits_ulong_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3716
3717
3718
3719
3720 int __gmpz_fits_ushort_p (mpz_srcptr) throw () __attribute__ ((__pure__));
3721
3722
3723
3724 void __gmpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr);
3725
3726
3727 mpir_ui __gmpz_gcd_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3728
3729
3730 void __gmpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
3731
3732
3733 double __gmpz_get_d (mpz_srcptr) __attribute__ ((__pure__));
3734
3735
3736 double __gmpz_get_d_2exp (mpir_si *, mpz_srcptr);
3737
3738
3739 mpir_si __gmpz_get_si (mpz_srcptr) throw () __attribute__ ((__pure__));
3740
3741
3742 char *__gmpz_get_str (char *, int, mpz_srcptr);
3743
3744
3745
3746 mpir_ui __gmpz_get_ui (mpz_srcptr) throw () __attribute__ ((__pure__));
3747
3748
3749
3750
3751 mp_limb_t __gmpz_getlimbn (mpz_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
3752
3753
3754
3755 mp_bitcnt_t __gmpz_hamdist (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__));
3756
3757
3758 void __gmpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
3759
3760
3761 void __gmpz_init (mpz_ptr);
3762
3763
3764 void __gmpz_init2 (mpz_ptr, mp_bitcnt_t);
3765
3766
3767 void __gmpz_inits (mpz_ptr, ...);
3768
3769
3770 void __gmpz_init_set (mpz_ptr, mpz_srcptr);
3771
3772
3773 void __gmpz_init_set_d (mpz_ptr, double);
3774
3775
3776 void __gmpz_init_set_si (mpz_ptr, mpir_si);
3777
3778
3779 int __gmpz_init_set_str (mpz_ptr, const char *, int);
3780
3781
3782 void __gmpz_init_set_ui (mpz_ptr, mpir_ui);
3783
3784
3785
3786 size_t __gmpz_inp_raw (mpz_ptr, FILE *);
3787
3788
3789
3790
3791 size_t __gmpz_inp_str (mpz_ptr, FILE *, int);
3792
3793
3794
3795 int __gmpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr);
3796
3797
3798 void __gmpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr);
3799
3800
3801 int __gmpz_jacobi (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__));
3802
3803
3804
3805
3806 int __gmpz_kronecker_si (mpz_srcptr, mpir_si) __attribute__ ((__pure__));
3807
3808
3809 int __gmpz_kronecker_ui (mpz_srcptr, mpir_ui) __attribute__ ((__pure__));
3810
3811
3812 int __gmpz_si_kronecker (mpir_si, mpz_srcptr) __attribute__ ((__pure__));
3813
3814
3815 int __gmpz_ui_kronecker (mpir_ui, mpz_srcptr) __attribute__ ((__pure__));
3816
3817
3818 void __gmpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr);
3819
3820
3821 void __gmpz_lcm_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3822
3823
3824
3825
3826 void __gmpz_lucnum_ui (mpz_ptr, mpir_ui);
3827
3828
3829 void __gmpz_lucnum2_ui (mpz_ptr, mpz_ptr, mpir_ui);
3830
3831
3832 int __gmpz_millerrabin (mpz_srcptr, int) __attribute__ ((__pure__));
3833
3834
3835 int __gmpz_miller_rabin (mpz_srcptr, int, gmp_randstate_t) __attribute__ ((__pure__));
3836
3837
3838 void __gmpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr);
3839
3840
3841
3842
3843
3844 void __gmpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr);
3845
3846
3847 void __gmpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
3848
3849
3850
3851 void __gmpz_mul_si (mpz_ptr, mpz_srcptr, mpir_si);
3852
3853
3854
3855 void __gmpz_mul_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3856
3857
3858
3859
3860 void __gmpz_neg (mpz_ptr, mpz_srcptr);
3861
3862
3863
3864 void __gmpz_nextprime (mpz_ptr, mpz_srcptr);
3865
3866
3867 void __gmpz_next_likely_prime (mpz_ptr, mpz_srcptr, gmp_randstate_t);
3868
3869
3870
3871 size_t __gmpz_out_raw (FILE *, mpz_srcptr);
3872
3873
3874
3875
3876 size_t __gmpz_out_str (FILE *, int, mpz_srcptr);
3877
3878
3879
3880 int __gmpz_perfect_power_p (mpz_srcptr) __attribute__ ((__pure__));
3881
3882
3883
3884 int __gmpz_perfect_square_p (mpz_srcptr) __attribute__ ((__pure__));
3885
3886
3887
3888
3889 mp_bitcnt_t __gmpz_popcount (mpz_srcptr) throw () __attribute__ ((__pure__));
3890
3891
3892
3893 void __gmpz_pow_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3894
3895
3896 void __gmpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr);
3897
3898
3899 void __gmpz_powm_ui (mpz_ptr, mpz_srcptr, mpir_ui, mpz_srcptr);
3900
3901
3902 int __gmpz_probab_prime_p (mpz_srcptr, int) __attribute__ ((__pure__));
3903
3904
3905 int __gmpz_probable_prime_p (mpz_srcptr,gmp_randstate_t, int, mpir_ui);
3906
3907
3908 int __gmpz_likely_prime_p (mpz_srcptr,gmp_randstate_t, mpir_ui);
3909
3910
3911 void __gmpz_realloc2 (mpz_ptr, mp_bitcnt_t);
3912
3913
3914 mp_bitcnt_t __gmpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr);
3915
3916
3917 int __gmpz_root (mpz_ptr, mpz_srcptr, mpir_ui);
3918
3919
3920 void __gmpz_nthroot (mpz_ptr, mpz_srcptr, mpir_ui);
3921
3922
3923 void __gmpz_rootrem (mpz_ptr,mpz_ptr, mpz_srcptr, mpir_ui);
3924
3925
3926 void __gmpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t);
3927
3928
3929 mp_bitcnt_t __gmpz_scan0 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
3930
3931
3932 mp_bitcnt_t __gmpz_scan1 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
3933
3934
3935
3936 void __gmpz_set (mpz_ptr, mpz_srcptr);
3937
3938
3939 void __gmpz_set_d (mpz_ptr, double);
3940
3941
3942 void __gmpz_set_f (mpz_ptr, mpf_srcptr);
3943
3944
3945
3946 void __gmpz_set_q (mpz_ptr, mpq_srcptr);
3947
3948
3949
3950
3951 void __gmpz_set_si (mpz_ptr, mpir_si);
3952
3953
3954 int __gmpz_set_str (mpz_ptr, const char *, int);
3955
3956
3957
3958 void __gmpz_set_ui (mpz_ptr, mpir_ui);
3959
3960
3961 void __gmpz_setbit (mpz_ptr, mp_bitcnt_t);
3962
3963
3964
3965 size_t __gmpz_size (mpz_srcptr) throw () __attribute__ ((__pure__));
3966
3967
3968
3969 size_t __gmpz_sizeinbase (mpz_srcptr, int) throw () __attribute__ ((__pure__));
3970
3971
3972 void __gmpz_sqrt (mpz_ptr, mpz_srcptr);
3973
3974
3975 void __gmpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr);
3976
3977
3978
3979 void __gmpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr);
3980
3981
3982
3983 void __gmpz_sub_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3984
3985
3986
3987 void __gmpz_ui_sub (mpz_ptr, mpir_ui, mpz_srcptr);
3988
3989
3990 void __gmpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr);
3991
3992
3993 void __gmpz_submul_ui (mpz_ptr, mpz_srcptr, mpir_ui);
3994
3995
3996 void __gmpz_swap (mpz_ptr, mpz_ptr) throw ();
3997
3998
3999 mpir_ui __gmpz_tdiv_ui (mpz_srcptr, mpir_ui) __attribute__ ((__pure__));
4000
4001
4002 void __gmpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr);
4003
4004
4005 void __gmpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
4006
4007
4008 mpir_ui __gmpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, mpir_ui);
4009
4010
4011 void __gmpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
4012
4013
4014 mpir_ui __gmpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, mpir_ui);
4015
4016
4017 void __gmpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr);
4018
4019
4020 void __gmpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t);
4021
4022
4023 mpir_ui __gmpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, mpir_ui);
4024
4025
4026 int __gmpz_tstbit (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__));
4027
4028
4029 void __gmpz_ui_pow_ui (mpz_ptr, mpir_ui, mpir_ui);
4030
4031
4032 void __gmpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t);
4033
4034
4035 void __gmpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr);
4036
4037
4038
4039 void __gmpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr);
4040# 1230 "../factory/cf_gmp.h"
4041 void __gmpq_abs (mpq_ptr, mpq_srcptr);
4042
4043
4044
4045 void __gmpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr);
4046
4047
4048 void __gmpq_canonicalize (mpq_ptr);
4049
4050
4051 void __gmpq_clear (mpq_ptr);
4052
4053
4054 void __gmpq_clears (mpq_ptr, ...);
4055
4056
4057 int __gmpq_cmp (mpq_srcptr, mpq_srcptr) __attribute__ ((__pure__));
4058
4059
4060 int __gmpq_cmp_si (mpq_srcptr, mpir_si, mpir_ui) __attribute__ ((__pure__));
4061
4062
4063 int __gmpq_cmp_ui (mpq_srcptr, mpir_ui, mpir_ui) __attribute__ ((__pure__));
4064
4065
4066 void __gmpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr);
4067
4068
4069 void __gmpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t);
4070
4071
4072 int __gmpq_equal (mpq_srcptr, mpq_srcptr) throw () __attribute__ ((__pure__));
4073
4074
4075 void __gmpq_get_num (mpz_ptr, mpq_srcptr);
4076
4077
4078 void __gmpq_get_den (mpz_ptr, mpq_srcptr);
4079
4080
4081 double __gmpq_get_d (mpq_srcptr) __attribute__ ((__pure__));
4082
4083
4084 char *__gmpq_get_str (char *, int, mpq_srcptr);
4085
4086
4087 void __gmpq_init (mpq_ptr);
4088
4089
4090 void __gmpq_inits (mpq_ptr, ...);
4091
4092
4093
4094 size_t __gmpq_inp_str (mpq_ptr, FILE *, int);
4095
4096
4097
4098 void __gmpq_inv (mpq_ptr, mpq_srcptr);
4099
4100
4101 void __gmpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr);
4102
4103
4104 void __gmpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t);
4105
4106
4107
4108 void __gmpq_neg (mpq_ptr, mpq_srcptr);
4109
4110
4111
4112
4113 size_t __gmpq_out_str (FILE *, int, mpq_srcptr);
4114
4115
4116
4117 void __gmpq_set (mpq_ptr, mpq_srcptr);
4118
4119
4120 void __gmpq_set_d (mpq_ptr, double);
4121
4122
4123 void __gmpq_set_den (mpq_ptr, mpz_srcptr);
4124
4125
4126 void __gmpq_set_f (mpq_ptr, mpf_srcptr);
4127
4128
4129 void __gmpq_set_num (mpq_ptr, mpz_srcptr);
4130
4131
4132 void __gmpq_set_si (mpq_ptr, mpir_si, mpir_ui);
4133
4134
4135 int __gmpq_set_str (mpq_ptr, const char *, int);
4136
4137
4138 void __gmpq_set_ui (mpq_ptr, mpir_ui, mpir_ui);
4139
4140
4141 void __gmpq_set_z (mpq_ptr, mpz_srcptr);
4142
4143
4144 void __gmpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr);
4145
4146
4147 void __gmpq_swap (mpq_ptr, mpq_ptr) throw ();
4148
4149
4150
4151
4152
4153 void __gmpf_abs (mpf_ptr, mpf_srcptr);
4154
4155
4156 void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr);
4157
4158
4159 void __gmpf_add_ui (mpf_ptr, mpf_srcptr, mpir_ui);
4160
4161 void __gmpf_ceil (mpf_ptr, mpf_srcptr);
4162
4163
4164 void __gmpf_clear (mpf_ptr);
4165
4166
4167 void __gmpf_clears (mpf_ptr, ...);
4168
4169
4170 int __gmpf_cmp (mpf_srcptr, mpf_srcptr) throw () __attribute__ ((__pure__));
4171
4172
4173 int __gmpf_cmp_d (mpf_srcptr, double) __attribute__ ((__pure__));
4174
4175
4176 int __gmpf_cmp_si (mpf_srcptr, mpir_si) throw () __attribute__ ((__pure__));
4177
4178
4179 int __gmpf_cmp_ui (mpf_srcptr, mpir_ui) throw () __attribute__ ((__pure__));
4180
4181
4182 void __gmpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr);
4183
4184
4185 void __gmpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t);
4186
4187
4188 void __gmpf_div_ui (mpf_ptr, mpf_srcptr, mpir_ui);
4189
4190
4191 void __gmpf_dump (mpf_srcptr);
4192
4193
4194 int __gmpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __attribute__ ((__pure__));
4195
4196
4197 int __gmpf_fits_sint_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4198
4199
4200 int __gmpf_fits_si_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4201
4202
4203 int __gmpf_fits_slong_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4204
4205
4206 int __gmpf_fits_sshort_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4207
4208
4209 int __gmpf_fits_uint_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4210
4211
4212 int __gmpf_fits_ui_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4213
4214
4215 int __gmpf_fits_ulong_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4216
4217
4218 int __gmpf_fits_ushort_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4219
4220
4221 void __gmpf_floor (mpf_ptr, mpf_srcptr);
4222
4223
4224 double __gmpf_get_d (mpf_srcptr) __attribute__ ((__pure__));
4225
4226
4227 double __gmpf_get_d_2exp (mpir_si *, mpf_srcptr);
4228
4229
4230 mp_bitcnt_t __gmpf_get_default_prec (void) throw () __attribute__ ((__pure__));
4231
4232
4233 mp_bitcnt_t __gmpf_get_prec (mpf_srcptr) throw () __attribute__ ((__pure__));
4234
4235
4236 mpir_si __gmpf_get_si (mpf_srcptr) throw () __attribute__ ((__pure__));
4237
4238
4239 char *__gmpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr);
4240
4241
4242 mpir_ui __gmpf_get_ui (mpf_srcptr) throw () __attribute__ ((__pure__));
4243
4244
4245 void __gmpf_init (mpf_ptr);
4246
4247
4248 void __gmpf_init2 (mpf_ptr, mp_bitcnt_t);
4249
4250
4251 void __gmpf_inits (mpf_ptr, ...);
4252
4253
4254 void __gmpf_init_set (mpf_ptr, mpf_srcptr);
4255
4256
4257 void __gmpf_init_set_d (mpf_ptr, double);
4258
4259
4260 void __gmpf_init_set_si (mpf_ptr, mpir_si);
4261
4262
4263 int __gmpf_init_set_str (mpf_ptr, const char *, int);
4264
4265
4266 void __gmpf_init_set_ui (mpf_ptr, mpir_ui);
4267
4268
4269
4270 size_t __gmpf_inp_str (mpf_ptr, FILE *, int);
4271
4272
4273
4274 int __gmpf_integer_p (mpf_srcptr) throw () __attribute__ ((__pure__));
4275
4276
4277 void __gmpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr);
4278
4279
4280 void __gmpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t);
4281
4282
4283 void __gmpf_mul_ui (mpf_ptr, mpf_srcptr, mpir_ui);
4284
4285
4286 void __gmpf_neg (mpf_ptr, mpf_srcptr);
4287
4288
4289
4290 size_t __gmpf_out_str (FILE *, int, size_t, mpf_srcptr);
4291
4292
4293
4294 void __gmpf_pow_ui (mpf_ptr, mpf_srcptr, mpir_ui);
4295
4296
4297 void __gmpf_random2 (mpf_ptr, mp_size_t, mp_exp_t);
4298
4299
4300 void __gmpf_rrandomb (mpf_ptr, gmp_randstate_t, mp_size_t, mp_exp_t);
4301
4302
4303 void __gmpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr);
4304
4305
4306 void __gmpf_set (mpf_ptr, mpf_srcptr);
4307
4308
4309 void __gmpf_set_d (mpf_ptr, double);
4310
4311
4312 void __gmpf_set_default_prec (mp_bitcnt_t) throw ();
4313
4314
4315 void __gmpf_set_prec (mpf_ptr, mp_bitcnt_t);
4316
4317
4318 void __gmpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) throw ();
4319
4320
4321 void __gmpf_set_q (mpf_ptr, mpq_srcptr);
4322
4323
4324 void __gmpf_set_si (mpf_ptr, mpir_si);
4325
4326
4327 int __gmpf_set_str (mpf_ptr, const char *, int);
4328
4329
4330 void __gmpf_set_ui (mpf_ptr, mpir_ui);
4331
4332
4333 void __gmpf_set_z (mpf_ptr, mpz_srcptr);
4334
4335
4336 size_t __gmpf_size (mpf_srcptr) throw () __attribute__ ((__pure__));
4337
4338
4339 void __gmpf_sqrt (mpf_ptr, mpf_srcptr);
4340
4341
4342 void __gmpf_sqrt_ui (mpf_ptr, mpir_ui);
4343
4344
4345 void __gmpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr);
4346
4347
4348 void __gmpf_sub_ui (mpf_ptr, mpf_srcptr, mpir_ui);
4349
4350
4351 void __gmpf_swap (mpf_ptr, mpf_ptr) throw ();
4352
4353
4354 void __gmpf_trunc (mpf_ptr, mpf_srcptr);
4355
4356
4357 void __gmpf_ui_div (mpf_ptr, mpir_ui, mpf_srcptr);
4358
4359
4360 void __gmpf_ui_sub (mpf_ptr, mpir_ui, mpf_srcptr);
4361
4362
4363 void __gmpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t);
4364# 1561 "../factory/cf_gmp.h"
4365 mp_limb_t __gmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t);
4366
4367
4368
4369
4370 mp_limb_t __gmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw ();
4371
4372
4373
4374 mp_limb_t __gmpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4375
4376
4377 mp_limb_t __gmpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
4378
4379
4380 mp_limb_t __gmpn_bdivmod (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mpir_ui);
4381
4382
4383 mp_limb_t __gmpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t);
4384
4385
4386 int __gmpn_mulmod_Bexpp1 (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr);
4387
4388
4389 int __gmpn_mulmod_2expp1_basecase (mp_ptr, mp_srcptr, mp_srcptr,int,mpir_ui, mp_ptr);
4390
4391
4392 void __gmpn_mulmod_2expm1 (mp_ptr, mp_ptr, mp_ptr, mpir_ui, mp_ptr);
4393
4394
4395
4396 int __gmpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
4397
4398
4399
4400 void __gmpn_redc_1 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
4401
4402
4403 void __gmpn_redc_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr);
4404
4405 void __gmpn_redc_n (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr);
4406
4407
4408
4409
4410
4411 mp_limb_t __gmpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
4412
4413
4414
4415
4416
4417 mp_limb_t __gmpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t);
4418
4419
4420 mp_limb_t __gmpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr);
4421
4422
4423 void __gmpn_invert (mp_ptr xp, mp_srcptr ap, mp_size_t n);
4424
4425
4426 mp_limb_t __gmpn_sb_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dip)
4427                                               ;
4428
4429
4430 mp_limb_t __gmpn_dc_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dip, mp_ptr tp)
4431                                     ;
4432
4433
4434 void __gmpn_dc_bdiv_q_n (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr scratch)
4435                                                 ;
4436
4437
4438 mp_limb_t __gmpn_inv_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_srcptr dip)
4439                                        ;
4440
4441
4442 mp_limb_t __gmpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_limb_t dinv)
4443                                 ;
4444
4445
4446 mp_limb_t __gmpn_dc_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4447                                                     ;
4448
4449
4450 mp_limb_t __gmpn_inv_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t n, mp_srcptr dinv)
4451                                 ;
4452
4453
4454 mp_limb_t __gmpn_inv_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
4455                                                     ;
4456
4457
4458 mp_limb_t __gmpn_inv_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
4459                                                     ;
4460
4461
4462 mp_limb_t __gmpn_inv_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t dn, mp_srcptr dinv)
4463                                                     ;
4464
4465
4466 mp_limb_t __gmpn_dc_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4467                                                     ;
4468
4469
4470 mp_limb_t __gmpn_dc_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp)
4471                                    ;
4472
4473
4474 mp_limb_t __gmpn_sb_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4475                                                     ;
4476
4477
4478 void __gmpn_sb_bdiv_q (mp_ptr qp, mp_ptr wp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4479                                                     ;
4480
4481
4482 void __gmpn_dc_bdiv_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4483                                                     ;
4484
4485
4486 mp_limb_t __gmpn_dc_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4487                                                     ;
4488
4489
4490 mp_limb_t __gmpn_dc_bdiv_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_limb_t dinv, mp_ptr tp)
4491                                                               ;
4492
4493
4494 mp_limb_t __gmpn_sb_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4495                                                     ;
4496
4497
4498 mp_limb_t __gmpn_sb_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_limb_t dinv)
4499                                                     ;
4500
4501
4502 void __gmpn_tdiv_q (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
4503                                                               ;
4504
4505
4506 void __gmpn_divexact (mp_ptr qp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
4507                                                               ;
4508
4509
4510 mp_size_t __gmpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
4511
4512
4513 mp_limb_t __gmpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__));
4514
4515
4516 mp_limb_t __gmpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t);
4517
4518
4519 mp_size_t __gmpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
4520
4521
4522 size_t __gmpn_get_str (unsigned char *, int, mp_ptr, mp_size_t);
4523
4524
4525 mp_bitcnt_t __gmpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
4526
4527
4528 mp_limb_t __gmpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
4529
4530
4531 mp_limb_t __gmpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__));
4532
4533
4534 mp_limb_t __gmpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
4535
4536
4537 mp_limb_t __gmpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
4538
4539
4540 void __gmpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4541
4542
4543 void __gmpn_sqr (mp_ptr, mp_srcptr, mp_size_t);
4544
4545
4546
4547 mp_limb_t __gmpn_neg_n (mp_ptr, mp_srcptr, mp_size_t);
4548
4549
4550
4551 void __gmpn_com_n (mp_ptr, mp_srcptr, mp_size_t);
4552
4553
4554 int __gmpn_perfect_square_p (mp_srcptr, mp_size_t) __attribute__ ((__pure__));
4555
4556
4557 mp_bitcnt_t __gmpn_popcount (mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__));
4558
4559
4560 mp_size_t __gmpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr);
4561
4562
4563
4564 mp_limb_t __gmpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __attribute__ ((__pure__));
4565
4566
4567 void __gmpn_random (mp_ptr, mp_size_t);
4568
4569
4570 void __gmpn_random2 (mp_ptr, mp_size_t);
4571
4572
4573 void __gmpn_urandomb (mp_ptr, gmp_randstate_t, mpir_ui);
4574
4575
4576 void __gmpn_urandomm (mp_ptr, gmp_randstate_t, mp_srcptr, mp_size_t);
4577
4578
4579 void __gmpn_randomb (mp_ptr, gmp_randstate_t, mp_size_t);
4580
4581
4582 void __gmpn_rrandom (mp_ptr, gmp_randstate_t, mp_size_t);
4583
4584
4585 mp_limb_t __gmpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
4586
4587
4588 mp_bitcnt_t __gmpn_scan0 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__));
4589
4590
4591 mp_bitcnt_t __gmpn_scan1 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__));
4592
4593
4594 mp_size_t __gmpn_set_str (mp_ptr, const unsigned char *, size_t, int);
4595
4596
4597 mp_size_t __gmpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t);
4598
4599
4600
4601 mp_limb_t __gmpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t);
4602
4603
4604
4605
4606 mp_limb_t __gmpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw ();
4607
4608
4609
4610 mp_limb_t __gmpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4611
4612
4613 mp_limb_t __gmpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
4614
4615
4616 void __gmpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);
4617
4618
4619 void __gmpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4620
4621 void __gmpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4622
4623 void __gmpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4624
4625 void __gmpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4626
4627 void __gmpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4628
4629 void __gmpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4630
4631 void __gmpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4632
4633 void __gmpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4634
4635
4636 void __gmpn_copyi (mp_ptr, mp_srcptr, mp_size_t);
4637
4638 void __gmpn_copyd (mp_ptr, mp_srcptr, mp_size_t);
4639
4640 void __gmpn_zero (mp_ptr, mp_size_t);
4641
4642
4643
4644 mp_limb_t __gmpn_sumdiff_n (mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
4645
4646
4647
4648
4649
4650 void __gmpn_mul_fft_main (mp_ptr r1, mp_srcptr i1, mp_size_t n1, mp_srcptr i2, mp_size_t n2);
4651# 1865 "../factory/cf_gmp.h"
4652extern __inline__ __attribute__((__gnu_inline__)) void
4653__gmpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u)
4654{
4655  if (__gmp_w != __gmp_u)
4656    __gmpz_set (__gmp_w, __gmp_u);
4657  __gmp_w->_mp_size = ((__gmp_w->_mp_size) >= 0 ? (__gmp_w->_mp_size) : -(__gmp_w->_mp_size));
4658}
4659# 1889 "../factory/cf_gmp.h"
4660extern __inline__ __attribute__((__gnu_inline__))
4661
4662int
4663__gmpz_fits_uint_p (mpz_srcptr __gmp_z) throw ()
4664{
4665  mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned) 0)));;
4666}
4667
4668
4669
4670
4671extern __inline__ __attribute__((__gnu_inline__))
4672
4673int
4674__gmpz_fits_ui_p (mpz_srcptr __gmp_z) throw ()
4675{
4676  mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= ((mpir_ui)(~(mpir_ui)0))));;
4677}
4678
4679
4680
4681
4682extern __inline__ __attribute__((__gnu_inline__))
4683
4684int
4685__gmpz_fits_ulong_p (mpz_srcptr __gmp_z) throw ()
4686{
4687  mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned long) 0)));;
4688}
4689
4690
4691
4692
4693extern __inline__ __attribute__((__gnu_inline__))
4694
4695int
4696__gmpz_fits_ushort_p (mpz_srcptr __gmp_z) throw ()
4697{
4698  mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= ((unsigned short) ~0)));;
4699}
4700
4701
4702
4703
4704extern __inline__ __attribute__((__gnu_inline__))
4705
4706mpir_ui
4707__gmpz_get_ui (mpz_srcptr __gmp_z) throw ()
4708{
4709  mp_ptr __gmp_p = __gmp_z->_mp_d;
4710  mp_size_t __gmp_n = __gmp_z->_mp_size;
4711  mp_limb_t __gmp_l = __gmp_p[0];
4712
4713
4714
4715
4716
4717
4718  return (mpir_ui)(__gmp_n != 0 ? __gmp_l : 0);
4719# 1956 "../factory/cf_gmp.h"
4720}
4721
4722
4723
4724
4725extern __inline__ __attribute__((__gnu_inline__))
4726
4727mp_limb_t
4728__gmpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) throw ()
4729{
4730  mp_limb_t __gmp_result = 0;
4731  if (__builtin_expect ((__gmp_n >= 0 && __gmp_n < ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size))) != 0, 1))
4732    __gmp_result = __gmp_z->_mp_d[__gmp_n];
4733  return __gmp_result;
4734}
4735
4736
4737
4738extern __inline__ __attribute__((__gnu_inline__)) void
4739__gmpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u)
4740{
4741  if (__gmp_w != __gmp_u)
4742    __gmpz_set (__gmp_w, __gmp_u);
4743  __gmp_w->_mp_size = - __gmp_w->_mp_size;
4744}
4745
4746
4747
4748
4749extern __inline__ __attribute__((__gnu_inline__))
4750
4751int
4752__gmpz_perfect_square_p (mpz_srcptr __gmp_a)
4753{
4754  mp_size_t __gmp_asize;
4755  int __gmp_result;
4756
4757  __gmp_asize = __gmp_a->_mp_size;
4758  __gmp_result = (__gmp_asize >= 0);
4759  if (__builtin_expect ((__gmp_asize > 0) != 0, 1))
4760    __gmp_result = __gmpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize);
4761  return __gmp_result;
4762}
4763
4764
4765
4766
4767extern __inline__ __attribute__((__gnu_inline__))
4768
4769mp_bitcnt_t
4770__gmpz_popcount (mpz_srcptr __gmp_u) throw ()
4771{
4772  mp_size_t __gmp_usize;
4773  mp_bitcnt_t __gmp_result;
4774
4775  __gmp_usize = __gmp_u->_mp_size;
4776  __gmp_result = (__gmp_usize < 0 ? (~(mp_bitcnt_t)0) : 0);
4777  if (__builtin_expect ((__gmp_usize > 0) != 0, 1))
4778    __gmp_result = __gmpn_popcount (__gmp_u->_mp_d, __gmp_usize);
4779  return __gmp_result;
4780}
4781
4782
4783
4784
4785extern __inline__ __attribute__((__gnu_inline__))
4786
4787void
4788__gmpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u)
4789{
4790  __gmpz_tdiv_q (__gmp_w, (&((__gmp_u)->_mp_num)), (&((__gmp_u)->_mp_den)));
4791}
4792
4793
4794
4795
4796extern __inline__ __attribute__((__gnu_inline__))
4797
4798size_t
4799__gmpz_size (mpz_srcptr __gmp_z) throw ()
4800{
4801  return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size));
4802}
4803
4804
4805
4806
4807
4808
4809extern __inline__ __attribute__((__gnu_inline__)) void
4810__gmpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u)
4811{
4812  if (__gmp_w != __gmp_u)
4813    __gmpq_set (__gmp_w, __gmp_u);
4814  __gmp_w->_mp_num._mp_size = ((__gmp_w->_mp_num._mp_size) >= 0 ? (__gmp_w->_mp_num._mp_size) : -(__gmp_w->_mp_num._mp_size));
4815}
4816
4817
4818
4819extern __inline__ __attribute__((__gnu_inline__)) void
4820__gmpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u)
4821{
4822  if (__gmp_w != __gmp_u)
4823    __gmpq_set (__gmp_w, __gmp_u);
4824  __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size;
4825}
4826# 2297 "../factory/cf_gmp.h"
4827extern __inline__ __attribute__((__gnu_inline__))
4828
4829mp_limb_t
4830__gmpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize)
4831{
4832  mp_limb_t __gmp_c;
4833  do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_add_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast<mp_limb_t> (0))) >> 0)) == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0);
4834  return __gmp_c;
4835}
4836
4837
4838
4839
4840extern __inline__ __attribute__((__gnu_inline__))
4841
4842mp_limb_t
4843__gmpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw ()
4844{
4845  mp_limb_t __gmp_c;
4846  do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x + (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_r) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x + 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_r) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0);
4847  return __gmp_c;
4848}
4849
4850
4851
4852
4853extern __inline__ __attribute__((__gnu_inline__))
4854
4855int
4856__gmpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) throw ()
4857{
4858  int __gmp_result;
4859  do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_y; (__gmp_result) = 0; __gmp_i = (__gmp_size); while (--__gmp_i >= 0) { __gmp_x = (__gmp_xp)[__gmp_i]; __gmp_y = (__gmp_yp)[__gmp_i]; if (__gmp_x != __gmp_y) { (__gmp_result) = (__gmp_x > __gmp_y ? 1 : -1); break; } } } while (0);
4860  return __gmp_result;
4861}
4862
4863
4864
4865
4866extern __inline__ __attribute__((__gnu_inline__))
4867
4868mp_limb_t
4869__gmpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize)
4870{
4871  mp_limb_t __gmp_c;
4872  do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_sub_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x - 1) & ((~ (static_cast<mp_limb_t> (0))) >> 0)), __gmp_x == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0);
4873  return __gmp_c;
4874}
4875
4876
4877
4878
4879extern __inline__ __attribute__((__gnu_inline__))
4880
4881mp_limb_t
4882__gmpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw ()
4883{
4884  mp_limb_t __gmp_c;
4885  do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x - (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_x) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x - 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_x) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0);
4886  return __gmp_c;
4887}
4888
4889
4890
4891}
4892# 2419 "../factory/cf_gmp.h"
4893typedef __mpz_struct MP_INT;
4894typedef __mpq_struct MP_RAT;
4895# 2429 "../factory/cf_gmp.h"
4896enum
4897{
4898  GMP_ERROR_NONE = 0,
4899  GMP_ERROR_UNSUPPORTED_ARGUMENT = 1,
4900  GMP_ERROR_DIVISION_BY_ZERO = 2,
4901  GMP_ERROR_SQRT_OF_NEGATIVE = 4,
4902  GMP_ERROR_INVALID_ARGUMENT = 8
4903};
4904# 5 "../kernel/si_gmp.h" 2
4905# 16 "../kernel/structs.h" 2
4906
4907
4908
4909
4910
4911typedef unsigned long NATNUMBER;
4912typedef mpz_ptr int_number;
4913
4914
4915
4916
4917
4918
4919
4920typedef short BOOLEAN;
4921
4922
4923typedef void * ADDRESS;
4924# 67 "../kernel/structs.h"
4925typedef long long int64;
4926
4927
4928
4929
4930
4931
4932
4933enum n_coeffType
4934{
4935  n_unknown=0,
4936  n_Zp,
4937  n_Q,
4938  n_R,
4939  n_GF,
4940  n_long_R,
4941  n_Zp_a,
4942  n_Q_a,
4943  n_long_C
4944
4945  ,n_Z,
4946  n_Zm,
4947  n_Zpn,
4948  n_Z2n
4949
4950};
4951
4952
4953enum nc_type
4954{
4955  nc_error = -1,
4956  nc_general = 0,
4957  nc_skew,
4958  nc_comm,
4959  nc_lie,
4960  nc_undef,
4961
4962  nc_exterior
4963};
4964
4965
4966struct snumber;
4967typedef struct snumber * number;
4968typedef number (*numberfunc)(number a,number b);
4969typedef number (*nMapFunc)(number a);
4970
4971
4972
4973class ip_smatrix;
4974class intvec;
4975class bigintmat;
4976class sleftv;
4977class slists;
4978class sattr;
4979class skStrategy;
4980class ssyStrategy;
4981class procinfo;
4982class kBucket;
4983class sBucket;
4984class CPolynomialSummator;
4985class CGlobalMultiplier;
4986class CFormulaPowerMultiplier;
4987
4988
4989struct n_Procs_s;
4990struct sip_sring;
4991struct sip_link;
4992struct spolynom;
4993
4994struct sip_package;
4995typedef struct sip_package ip_package;
4996typedef ip_package * package;
4997
4998
4999struct sip_sideal;
5000struct sip_smap;
5001typedef struct sip_smap * map;
5002typedef struct sip_sideal * ideal;
5003
5004
5005typedef struct n_Procs_s n_Procs_s;
5006
5007
5008struct nc_struct;
5009typedef struct nc_struct nc_struct;
5010
5011
5012typedef struct spolyrec polyrec;
5013typedef struct sip_sring ip_sring;
5014typedef struct sip_link ip_link;
5015
5016
5017typedef char * char_ptr;
5018typedef int * int_ptr;
5019typedef ip_sring * ring;
5020typedef polyrec * poly;
5021typedef poly * polyset;
5022
5023
5024typedef ip_smatrix * matrix;
5025typedef ip_link * si_link;
5026typedef sleftv * leftv;
5027typedef slists * lists;
5028typedef sattr * attr;
5029typedef skStrategy * kStrategy;
5030typedef ssyStrategy * syStrategy;
5031typedef procinfo * procinfov;
5032typedef kBucket* kBucket_pt;
5033typedef sBucket* sBucket_pt;
5034typedef struct p_Procs_s p_Procs_s;
5035
5036struct n_Procs_s
5037{
5038   n_Procs_s* next;
5039
5040
5041   int npPrimeM;
5042   int npPminus1M;
5043
5044
5045
5046
5047   unsigned short *npExpTable;
5048   unsigned short *npLogTable;
5049
5050
5051
5052
5053   numberfunc nMult, nSub ,nAdd ,nDiv, nIntDiv, nIntMod, nExactDiv;
5054   number (*cfInit)(int i,const ring r);
5055   number (*nPar)(int i);
5056   int (*nParDeg)(number n);
5057   int (*nSize)(number n);
5058   int (*n_Int)(number &n, const ring r);
5059
5060   int (*nDivComp)(number a,number b);
5061   BOOLEAN (*nIsUnit)(number a);
5062   number (*nGetUnit)(number a);
5063   number (*nExtGcd)(number a, number b, number *s, number *t);
5064
5065   number (*nNeg)(number a);
5066   number (*nInvers)(number a);
5067   number (*nCopy)(number a);
5068   number (*cfCopy)(number a, const ring r);
5069   number (*nRePart)(number a);
5070   number (*nImPart)(number a);
5071   void (*cfWrite)(number &a, const ring r);
5072   const char * (*nRead)(const char * s, number * a);
5073   void (*nNormalize)(number &a);
5074   BOOLEAN (*nGreater)(number a,number b),
5075
5076           (*nDivBy)(number a, number b),
5077
5078           (*nEqual)(number a,number b),
5079           (*nIsZero)(number a),
5080           (*nIsOne)(number a),
5081           (*nIsMOne)(number a),
5082           (*nGreaterZero)(number a);
5083   void (*nPower)(number a, int i, number * result);
5084   number (*cfGetDenom)(number &n, const ring r);
5085   number (*cfGetNumerator)(number &n, const ring r);
5086   number (*nGcd)(number a, number b, const ring r);
5087   number (*nLcm)(number a, number b, const ring r);
5088   number (*cfFarey)(number p, number n, const ring r);
5089   number (*cfChineseRemainder)(number *x, number *q,int rl, const ring);
5090   void (*cfDelete)(number * a, const ring r);
5091   nMapFunc (*cfSetMap)(const ring src, const ring dst);
5092   char * (*nName)(number n);
5093   void (*nInpMult)(number &a, number b, ring r);
5094
5095
5096
5097
5098   number nNULL;
5099   int char_flag;
5100   int ref;
5101   n_coeffType type;
5102   short nChar;
5103};
5104
5105
5106
5107typedef long (*pLDegProc)(poly p, int *length, ring r);
5108typedef long (*pFDegProc)(poly p, ring r);
5109typedef void (*p_SetmProc)(poly p, const ring r);
5110
5111typedef enum
5112{
5113  ro_dp,
5114  ro_wp,
5115  ro_am,
5116  ro_wp64,
5117  ro_wp_neg,
5118
5119  ro_cp,
5120  ro_syzcomp,
5121  ro_syz,
5122  ro_isTemp, ro_is,
5123  ro_none
5124}
5125ro_typ;
5126
5127
5128struct sro_dp
5129{
5130  short place;
5131  short start;
5132  short end;
5133};
5134typedef struct sro_dp sro_dp;
5135
5136
5137struct sro_wp
5138{
5139  short place;
5140  short start;
5141  short end;
5142  int *weights;
5143};
5144typedef struct sro_wp sro_wp;
5145
5146
5147struct sro_am
5148{
5149  short place;
5150  short start;
5151  short end;
5152  short len_gen;
5153  int *weights;
5154
5155};
5156typedef struct sro_am sro_am;
5157
5158
5159struct sro_wp64
5160{
5161    short place;
5162    short start;
5163    short end;
5164    int64 *weights64;
5165};
5166typedef struct sro_wp64 sro_wp64;
5167
5168
5169struct sro_cp
5170{
5171  short place;
5172  short start;
5173  short end;
5174};
5175typedef struct sro_cp sro_cp;
5176
5177
5178struct sro_syzcomp
5179{
5180  short place;
5181  long *ShiftedComponents;
5182  int* Components;
5183
5184
5185
5186};
5187typedef struct sro_syzcomp sro_syzcomp;
5188
5189
5190struct sro_syz
5191{
5192  short place;
5193  int limit;
5194  int* syz_index;
5195  int curr_index;
5196};
5197
5198typedef struct sro_syz sro_syz;
5199
5200
5201
5202
5203
5204
5205
5206struct sro_ISTemp
5207{
5208  short start;
5209  int suffixpos;
5210  int* pVarOffset;
5211};
5212
5213
5214
5215
5216struct sro_IS
5217{
5218  short start, end;
5219  int* pVarOffset;
5220
5221  int limit;
5222
5223
5224  ideal F;
5225  const intvec* componentWeights;
5226};
5227
5228typedef struct sro_IS sro_IS;
5229typedef struct sro_ISTemp sro_ISTemp;
5230
5231struct sro_ord
5232{
5233  ro_typ ord_typ;
5234  int order_index;
5235  union
5236  {
5237     sro_dp dp;
5238     sro_wp wp;
5239     sro_am am;
5240     sro_wp64 wp64;
5241     sro_cp cp;
5242     sro_syzcomp syzcomp;
5243     sro_syz syz;
5244     sro_IS is;
5245     sro_ISTemp isTemp;
5246  } data;
5247};
5248
5249
5250
5251typedef poly (*mm_Mult_p_Proc_Ptr)(const poly m, poly p, const ring r);
5252typedef poly (*mm_Mult_pp_Proc_Ptr)(const poly m, const poly p, const ring r);
5253
5254typedef ideal (*GB_Proc_Ptr)(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat);
5255
5256typedef poly (*SPoly_Proc_Ptr)(const poly p1, const poly p2, const ring r);
5257typedef poly (*SPolyReduce_Proc_Ptr)(const poly p1, poly p2, const ring r);
5258
5259typedef void (*bucket_Proc_Ptr)(kBucket_pt b, poly p, number *c);
5260
5261struct nc_pProcs
5262{
5263public:
5264  mm_Mult_p_Proc_Ptr mm_Mult_p;
5265  mm_Mult_pp_Proc_Ptr mm_Mult_pp;
5266
5267  bucket_Proc_Ptr BucketPolyRed;
5268  bucket_Proc_Ptr BucketPolyRed_Z;
5269
5270  SPoly_Proc_Ptr SPoly;
5271  SPolyReduce_Proc_Ptr ReduceSPoly;
5272
5273  GB_Proc_Ptr GB;
5274
5275
5276};
5277
5278
5279struct nc_struct
5280{
5281  nc_type type;
5282
5283
5284
5285
5286
5287  matrix C;
5288  matrix D;
5289
5290
5291  matrix *MT;
5292  matrix COM;
5293  int *MTsize;
5294
5295
5296
5297  int IsSkewConstant;
5298
5299  private:
5300
5301
5302    union
5303    {
5304      struct
5305      {
5306
5307
5308
5309
5310        unsigned int iFirstAltVar, iLastAltVar;
5311
5312
5313
5314        ideal idSCAQuotient;
5315      } sca;
5316    } data;
5317
5318    CGlobalMultiplier* m_Multiplier;
5319    CFormulaPowerMultiplier* m_PowerMultiplier;
5320
5321  public:
5322
5323    inline nc_type& ncRingType() { return (type); };
5324    inline nc_type ncRingType() const { return (type); };
5325
5326    inline unsigned int& FirstAltVar()
5327        { ((void) 0); return (data.sca.iFirstAltVar); };
5328    inline unsigned int& LastAltVar ()
5329        { ((void) 0); return (data.sca.iLastAltVar ); };
5330
5331    inline unsigned int FirstAltVar() const
5332        { ((void) 0); return (data.sca.iFirstAltVar); };
5333    inline unsigned int LastAltVar () const
5334        { ((void) 0); return (data.sca.iLastAltVar ); };
5335
5336    inline ideal& SCAQuotient()
5337        { ((void) 0); return (data.sca.idSCAQuotient); };
5338
5339    inline CGlobalMultiplier* GetGlobalMultiplier() const
5340        { return (m_Multiplier); };
5341
5342    inline CGlobalMultiplier*& GetGlobalMultiplier()
5343        { return (m_Multiplier); };
5344
5345
5346    inline CFormulaPowerMultiplier* GetFormulaPowerMultiplier() const
5347        { return (m_PowerMultiplier); };
5348
5349    inline CFormulaPowerMultiplier*& GetFormulaPowerMultiplier()
5350        { return (m_PowerMultiplier); };
5351
5352  public:
5353    nc_pProcs p_Procs;
5354
5355};
5356
5357
5358class idrec;
5359typedef idrec * idhdl;
5360
5361struct sip_sring
5362{
5363
5364
5365
5366  idhdl idroot;
5367  int* order;
5368  int* block0;
5369  int* block1;
5370  char** parameter;
5371  number minpoly;
5372  ideal minideal;
5373  int** wvhdl;
5374  char ** names;
5375
5376
5377  long *ordsgn;
5378
5379
5380
5381  sro_ord* typ;
5382
5383
5384
5385  int* NegWeightL_Offset;
5386
5387  int* VarOffset;
5388
5389  ideal qideal;
5390
5391  int* firstwv;
5392
5393  omBin PolyBin;
5394
5395  unsigned int ringtype;
5396  int_number ringflaga;
5397  unsigned long ringflagb;
5398  unsigned long nr2mModul;
5399  int_number nrnModul;
5400
5401  unsigned long options;
5402
5403  int ch;
5404  int ref;
5405
5406  short float_len;
5407  short float_len2;
5408
5409  short N;
5410
5411  short P;
5412  short OrdSgn;
5413
5414  short firstBlockEnds;
5415
5416  short real_var_start, real_var_end;
5417
5418
5419
5420  short isLPring;
5421
5422
5423  BOOLEAN VectorOut;
5424  BOOLEAN ShortOut;
5425  BOOLEAN CanShortOut;
5426  BOOLEAN LexOrder;
5427  BOOLEAN MixedOrder;
5428
5429  BOOLEAN ComponentOrder;
5430
5431
5432
5433  short ExpL_Size;
5434  short CmpL_Size;
5435
5436
5437
5438  short VarL_Size;
5439  short BitsPerExp;
5440  short ExpPerLong;
5441  short pCompIndex;
5442  short pOrdIndex;
5443  short OrdSize;
5444
5445
5446
5447  short VarL_LowIndex;
5448
5449
5450  short MinExpPerLong;
5451
5452  short NegWeightL_Size;
5453
5454
5455  int* VarL_Offset;
5456
5457
5458  unsigned long bitmask;
5459
5460  unsigned long divmask;
5461
5462  p_Procs_s* p_Procs;
5463
5464
5465  pFDegProc pFDeg;
5466  pLDegProc pLDeg;
5467
5468
5469  pFDegProc pFDegOrig;
5470
5471  pLDegProc pLDegOrig;
5472
5473  p_SetmProc p_Setm;
5474  n_Procs_s* cf;
5475  ring algring;
5476
5477  private:
5478    nc_struct* _nc;
5479  public:
5480    inline const nc_struct* GetNC() const { return _nc; };
5481    inline nc_struct*& GetNC() { return _nc; };
5482
5483};
5484# 639 "../kernel/structs.h"
5485extern "C" {
5486
5487void m2_end(int i) __attribute__((noreturn));
5488
5489}
5490
5491
5492
5493
5494
5495int inits(void);
5496int IsPrime(int i);
5497extern int siSeed;
5498int siRand();
5499# 662 "../kernel/structs.h"
5500static inline int si_max(const int a, const int b) { return (a>b) ? a : b; }
5501static inline int si_min(const int a, const int b) { return (a<b) ? a : b; }
5502static inline long si_max(const long a, const long b) { return (a>b) ? a : b; }
5503static inline unsigned long si_max(const unsigned long a, const unsigned long b) { return (a>b) ? a : b; }
5504static inline long si_min(const long a, const long b) { return (a<b) ? a : b; }
5505static inline unsigned long si_min(const unsigned long a, const unsigned long b) { return (a<b) ? a : b; }
5506
5507
5508
5509
5510
5511extern omBin char_ptr_bin;
5512extern omBin sleftv_bin;
5513# 12 "../kernel/febase.h" 2
5514
5515
5516
5517
5518
5519
5520
5521extern char fePathSep;
5522
5523
5524
5525# 1 "/usr/include/sys/param.h" 1 3 4
5526# 37 "/usr/include/sys/param.h" 3 4
5527#pragma ident "@(#)param.h      1.82    06/01/30 SMI"
5528# 46 "/usr/include/sys/param.h" 3 4
5529extern "C" {
5530# 297 "/usr/include/sys/param.h" 3 4
5531}
5532# 441 "/usr/include/sys/param.h" 3 4
5533extern "C" {
5534
5535
5536
5537extern long _sysconf(int);
5538# 456 "/usr/include/sys/param.h" 3 4
5539}
5540# 24 "../kernel/febase.h" 2
5541
5542
5543
5544
5545
5546# 1 "../omalloc/mylimits.h" 1
5547# 18 "../omalloc/mylimits.h"
5548# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 1 3 4
5549# 34 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 3 4
5550# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/syslimits.h" 1 3 4
5551
5552
5553
5554
5555
5556
5557# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 1 3 4
5558# 169 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 3 4
5559# 1 "/usr/include/limits.h" 1 3 4
5560# 16 "/usr/include/limits.h" 3 4
5561#pragma ident "@(#)limits.h     1.59    04/08/24 SMI"
5562
5563
5564
5565# 1 "/usr/include/iso/limits_iso.h" 1 3 4
5566# 28 "/usr/include/iso/limits_iso.h" 3 4
5567#pragma ident "@(#)limits_iso.h 1.2     03/12/04 SMI"
5568
5569
5570extern "C" {
5571# 83 "/usr/include/iso/limits_iso.h" 3 4
5572}
5573# 21 "/usr/include/limits.h" 2 3 4
5574# 32 "/usr/include/limits.h" 3 4
5575# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/sys/int_limits.h" 1 3 4
5576# 18 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/sys/int_limits.h" 3 4
5577#pragma ident "@(#)int_limits.h 1.9     04/09/28 SMI"
5578# 47 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/sys/int_limits.h" 3 4
5579extern "C" {
5580# 266 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/sys/int_limits.h" 3 4
5581}
5582# 33 "/usr/include/limits.h" 2 3 4
5583
5584
5585
5586extern "C" {
5587# 296 "/usr/include/limits.h" 3 4
5588extern long _sysconf(int);
5589# 306 "/usr/include/limits.h" 3 4
5590}
5591# 170 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 2 3 4
5592# 8 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/syslimits.h" 2 3 4
5593# 35 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/limits.h" 2 3 4
5594# 19 "../omalloc/mylimits.h" 2
5595# 30 "../kernel/febase.h" 2
5596# 80 "../kernel/febase.h"
5597size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream);
5598
5599enum noeof_t
5600{
5601  noeof_brace = 1,
5602  noeof_asstring,
5603  noeof_block,
5604  noeof_bracket,
5605  noeof_comment,
5606  noeof_procname,
5607  noeof_string
5608};
5609
5610extern char* feErrors;
5611extern char* feArgv0;
5612extern int feErrorsLen;
5613extern FILE* feProtFile;
5614extern FILE* feFilePending;
5615extern char fe_promptstr[];
5616extern int si_echo, printlevel;
5617extern int colmax;
5618extern int yy_blocklineno;
5619extern int yy_noeof;
5620extern char prompt_char;
5621extern const char feNotImplemented[];
5622extern BOOLEAN errorreported;
5623extern int feProt;
5624extern BOOLEAN feWarn;
5625extern BOOLEAN feOut;
5626extern int traceit ;
5627
5628
5629
5630
5631
5632
5633
5634extern int myynest;
5635extern int yylineno;
5636extern char my_yylinebuf[80];
5637# 130 "../kernel/febase.h"
5638extern "C" {
5639
5640
5641
5642
5643
5644
5645extern void (*WerrorS_callback)(const char *s);
5646
5647void Werror(const char *fmt, ...) __attribute__((format(printf,1,2)));
5648void WerrorS(const char *s);
5649void WarnS(const char *s);
5650void Print(const char* fmt, ...) __attribute__((format(printf,1,2)));
5651
5652
5653void PrintNSpaces(const int n);
5654void PrintLn();
5655void PrintS(const char* s);
5656char* feGetResource(const char id);
5657
5658
5659
5660
5661
5662
5663
5664}
5665
5666
5667typedef enum { LANG_NONE, LANG_TOP, LANG_SINGULAR, LANG_C, LANG_MAX} language_defs;
5668
5669
5670
5671
5672
5673class proc_singular
5674{
5675public:
5676  long proc_start;
5677  long def_end;
5678  long help_start;
5679  long help_end;
5680  long body_start;
5681  long body_end;
5682  long example_start;
5683  long proc_end;
5684  int proc_lineno;
5685  int body_lineno;
5686  int example_lineno;
5687  char *body;
5688  long help_chksum;
5689};
5690
5691struct proc_object
5692{
5693
5694  BOOLEAN (*function)(leftv res, leftv v);
5695};
5696union uprocinfodata
5697{
5698public:
5699  proc_singular s;
5700  struct proc_object o;
5701};
5702
5703typedef union uprocinfodata procinfodata;
5704
5705class procinfo;
5706typedef procinfo * procinfov;
5707
5708class procinfo
5709{
5710public:
5711  char *libname;
5712  char *procname;
5713  package pack;
5714  language_defs language;
5715  short ref;
5716  char is_static;
5717  char trace_flag;
5718  procinfodata data;
5719};
5720enum feBufferTypes
5721{
5722  BT_none = 0,
5723  BT_break = 1,
5724  BT_proc,
5725  BT_example,
5726  BT_file,
5727  BT_execute,
5728  BT_if,
5729  BT_else
5730};
5731
5732enum feBufferInputs
5733{
5734  BI_stdin = 1,
5735  BI_buffer,
5736  BI_file
5737};
5738# 241 "../kernel/febase.h"
5739char* feResource(const char id, int warn = -1);
5740char* feResource(const char* key, int warn = -1);
5741
5742
5743void feInitResources(char* argv0);
5744
5745void feReInitResources();
5746
5747void feStringAppendResources(int warn = -1);
5748# 258 "../kernel/febase.h"
5749void feHelp(char* str = __null);
5750
5751
5752
5753
5754
5755
5756
5757const char* feHelpBrowser(char* browser = __null, int warn = -1);
5758void feStringAppendBrowsers(int warn = -1);
5759# 281 "../kernel/febase.h"
5760FILE * feFopen(const char *path, const char *mode, char *where=__null,
5761                int useWerror=0, int path_only=0);
5762
5763char * StringAppend(const char *fmt, ...);
5764char * StringAppendS(const char *s);
5765char * StringSetS(const char* s);
5766const char * VoiceName();
5767void VoiceBackTrack();
5768void Warn(const char *fmt, ...);
5769BOOLEAN contBuffer(feBufferTypes typ);
5770const char * eati(const char *s, int *i);
5771BOOLEAN exitBuffer(feBufferTypes typ);
5772BOOLEAN exitVoice();
5773void monitor(void *F, int mode);
5774BOOLEAN newFile(char* fname, FILE *f=__null);
5775void newBuffer(char* s, feBufferTypes t, procinfo *pname = __null, int start_lineno = 0);
5776void * myynewbuffer();
5777void myyoldbuffer(void * oldb);
5778
5779class Voice
5780{
5781  public:
5782    Voice * next;
5783    Voice * prev;
5784    char * filename;
5785    procinfo * pi;
5786    void * oldb;
5787
5788    FILE * files;
5789
5790    char * buffer;
5791    long fptr;
5792
5793    int start_lineno;
5794    int curr_lineno;
5795    feBufferInputs sw;
5796
5797
5798    char ifsw;
5799
5800
5801
5802
5803    feBufferTypes typ;
5804
5805  Voice() { memset(this,0,sizeof(*this));}
5806  feBufferTypes Typ();
5807  void Next();
5808} ;
5809
5810extern Voice *currentVoice;
5811
5812Voice * feInitStdin(Voice *pp);
5813
5814
5815
5816
5817extern char * (*fe_fgets_stdin)(const char *pr,char *s, int size);
5818
5819
5820
5821
5822
5823extern "C" void fe_reset_input_mode();
5824
5825extern "C" {
5826
5827
5828
5829void fe_reset_fe (void);
5830
5831}
5832
5833
5834
5835
5836extern "C"
5837{
5838
5839
5840  char * fe_fgets_stdin_rl(const char *pr,char *s, int size);
5841
5842
5843  char * fe_fgets_stdin_emu(const char *pr,char *s, int size);
5844
5845
5846  char * fe_fgets(const char *pr,char *s, int size);
5847
5848
5849  char * fe_fgets_dummy(const char *pr,char *s, int size);
5850
5851
5852}
5853
5854
5855
5856
5857
5858
5859void SPrintStart();
5860char* SPrintEnd();
5861# 9 "bigintmat.cc" 2
5862# 1 "../kernel/options.h" 1
5863# 14 "../kernel/options.h"
5864extern "C" unsigned int test;
5865extern "C" unsigned int verbose;
5866# 10 "bigintmat.cc" 2
5867# 1 "../kernel/bigintmat.h" 1
5868# 10 "../kernel/bigintmat.h"
5869# 1 "../omalloc/omalloc.h" 1
5870# 11 "../kernel/bigintmat.h" 2
5871
5872# 1 "../kernel/longrat.h" 1
5873# 25 "../kernel/longrat.h"
5874struct snumber;
5875typedef struct snumber *number;
5876struct snumber
5877{
5878  mpz_t z;
5879  mpz_t n;
5880
5881
5882
5883  BOOLEAN s;
5884};
5885# 46 "../kernel/longrat.h"
5886 BOOLEAN nlEqual(number a, number b);
5887 number nlInit(int i, const ring r);
5888 number nlInitgmp (mpz_t i);
5889number nlRInit (long i);
5890 BOOLEAN nlIsOne(number a);
5891 BOOLEAN nlIsZero(number za);
5892 number nlCopy(number a);
5893 void nlDelete(number *a, const ring r);
5894 number nlNeg(number za);
5895 number nlAdd(number la, number li);
5896 number nlSub(number la, number li);
5897 number nlMult(number a, number b);
5898
5899number nlInit2 (int i, int j);
5900number nlInit2gmp (mpz_t i, mpz_t j);
5901number nlGcd(number a, number b, const ring r);
5902number nlLcm(number a, number b, const ring r);
5903BOOLEAN nlGreater(number a, number b);
5904BOOLEAN nlIsMOne(number a);
5905int nlInt(number &n, const ring r);
5906number nlBigInt(number &n);
5907
5908void nlGMP(number &i, number n);
5909
5910BOOLEAN nlGreaterZero(number za);
5911number nlInvers(number a);
5912void nlNormalize(number &x);
5913number nlDiv(number a, number b);
5914number nlExactDiv(number a, number b);
5915number nlIntDiv(number a, number b);
5916number nlIntMod(number a, number b);
5917void nlPower(number x, int exp, number *lu);
5918const char * nlRead (const char *s, number *a);
5919void nlWrite(number &a, const ring r);
5920int nlModP(number n, int p);
5921int nlSize(number n);
5922number nlGetDenom(number &n, const ring r);
5923number nlGetNumerator(number &n, const ring r);
5924number nlChineseRemainder(number *x, number *q,int rl, const ring);
5925
5926
5927
5928extern number nlOne;
5929
5930nMapFunc nlSetMap(const ring src, const ring dst);
5931
5932number nlMapGMP(number from);
5933# 101 "../kernel/longrat.h"
5934extern omBin rnumber_bin;
5935
5936
5937
5938
5939
5940
5941void nlInpGcd(number &a, number b, const ring r);
5942void nlInpIntDiv(number &a, number b, const ring r);
5943 number nlInpAdd(number la, number li, const ring r);
5944 void nlInpMult(number &a, number b, ring r);
5945
5946number nlFarey(number nP, number nN, const ring);
5947# 13 "../kernel/bigintmat.h" 2
5948# 1 "../kernel/intvec.h" 1
5949# 10 "../kernel/intvec.h"
5950# 1 "../omalloc/omalloc.h" 1
5951# 11 "../kernel/intvec.h" 2
5952
5953
5954
5955
5956
5957class intvec
5958{
5959private:
5960  int *v;
5961  int row;
5962  int col;
5963public:
5964
5965  inline intvec(int l = 1)
5966    {
5967      v = (int *)_omAlloc0(sizeof(int)*l);
5968      row = l;
5969      col = 1;
5970    }
5971  intvec(int s, int e);
5972  intvec(int r, int c, int init);
5973  intvec(const intvec* iv)
5974  {
5975    ((void) 0);
5976    row = iv->rows();
5977    col = iv->cols();
5978    if (row*col>0)
5979    {
5980      v = (int *)_omAlloc(sizeof(int)*row*col);
5981      for (int i=row*col-1;i>=0; i--)
5982      {
5983        v[i] = (*iv)[i];
5984      }
5985    }
5986    else v=__null;
5987  }
5988
5989  void resize(int new_length);
5990  inline int range(int i) const
5991    { return ((i<row) && (i>=0) && (col==1)); }
5992  inline int range(int i, int j) const
5993    { return ((i<row) && (i>=0) && (j<col) && (j>=0)); }
5994  inline int& operator[](int i)
5995    {
5996
5997
5998
5999
6000
6001
6002      return v[i];
6003    }
6004  inline const int& operator[](int i) const
6005    {
6006
6007
6008
6009
6010
6011
6012      return v[i];
6013    }
6014
6015  void operator+=(int intop);
6016  void operator-=(int intop);
6017  void operator*=(int intop);
6018  void operator/=(int intop);
6019  void operator%=(int intop);
6020
6021  int compare(const intvec* o) const;
6022  int compare(int o) const;
6023  inline int length() const { return col*row; }
6024  inline int cols() const { return col; }
6025  inline int rows() const { return row; }
6026  inline void length(int l) { row = l; col = 1; }
6027  void show(int mat=0,int spaces=0) const;
6028
6029
6030
6031
6032  inline void makeVector() { row*=col;col=1; }
6033  char * String(int dim = 2) const;
6034  char * ivString(int not_mat=1,int spaces=0, int dim=2) const;
6035  inline ~intvec()
6036    {
6037      if (v!=__null)
6038      {
6039        do { if ((sizeof(int)*row*col <= 1016) || _omIsBinPageAddr((ADDRESS)v)) { do { register void* __om_addr = (void*) ((ADDRESS)v); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { omFreeLarge((ADDRESS)v); } } while (0);
6040        v=__null;
6041      }
6042    }
6043  inline void ivTEST() const
6044    {
6045      ((void) 0);
6046    }
6047  inline int min_in()
6048  {
6049    int m=v[0];
6050    for (int i=row*col-1; i>0; i--) if (v[i]<m) m=v[i];
6051    return m;
6052  }
6053# 126 "../kernel/intvec.h"
6054  inline int * ivGetVec() { return v; }
6055};
6056inline intvec * ivCopy(const intvec * o)
6057{
6058  if( o != __null )
6059    return new intvec(o);
6060
6061  return __null;
6062}
6063
6064intvec * ivAdd(intvec * a, intvec * b);
6065intvec * ivSub(intvec * a, intvec * b);
6066intvec * ivTranp(intvec * o);
6067int ivTrace(intvec * o);
6068intvec * ivMult(intvec * a, intvec * b);
6069
6070void ivTriangIntern(intvec * imat, int &ready, int &all);
6071intvec * ivSolveKern(intvec * imat, int ready);
6072# 14 "../kernel/bigintmat.h" 2
6073
6074
6075class bigintmat
6076{
6077private:
6078  number *v;
6079  int row;
6080  int col;
6081public:
6082
6083  bigintmat()
6084  {
6085    row = 1;
6086    col = 0;
6087    v = __null;
6088  }
6089  bigintmat(int r, int c);
6090
6091  bigintmat(const bigintmat *m)
6092  {
6093    row = m->rows();
6094    col = m->cols();
6095    if (row*col>0)
6096    {
6097      v = (number *)_omAlloc(sizeof(number)*row*col);
6098      for (int i=row*col-1; i>=0; i--)
6099      {
6100        v[i] = nlCopy((*m)[i]);
6101      }
6102    }
6103  }
6104
6105
6106  inline number& operator[](int i)
6107    {
6108
6109
6110
6111
6112
6113
6114      return v[i];
6115    }
6116  inline const number& operator[](int i) const
6117    {
6118
6119
6120
6121
6122
6123
6124      return v[i];
6125    }
6126
6127
6128  void operator*=(int intop);
6129  void operator*=(number bintop);
6130  void operator+=(int intop);
6131  void operator+=(number bintop);
6132  void operator-=(int intop);
6133  void operator-=(number bintop);
6134  inline int length() { return col*row; }
6135  inline int cols() const { return col; }
6136  inline int rows() const { return row; }
6137  inline ~bigintmat()
6138    {
6139      if (v!=__null)
6140      {
6141        for (int i=0; i<row*col; i++) { nlDelete(&(v[i]), __null); }
6142        do { if ((sizeof(number)*row*col <= 1016) || _omIsBinPageAddr((ADDRESS)v)) { do { register void* __om_addr = (void*) ((ADDRESS)v); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { omFreeLarge((ADDRESS)v); } } while (0);
6143        v=__null;
6144      }
6145    }
6146  number get(int i, int j);
6147  number get(int i);
6148  void set(int i, int j, number n);
6149  void set(int i, number n);
6150  char * String();
6151  void pprint(int maxwid);
6152  int compare(const bigintmat* op) const;
6153  int * getwid(int maxwid);
6154  bigintmat * transpose();
6155};
6156bool operator==(bigintmat & lhr, bigintmat & rhr);
6157bool operator!=(bigintmat & lhr, bigintmat & rhr);
6158bigintmat * bimAdd(bigintmat * a, bigintmat * b);
6159bigintmat * bimSub(bigintmat * a, bigintmat * b);
6160bigintmat * bimMult(bigintmat * a, bigintmat * b);
6161intvec * bim2iv(bigintmat * b);
6162bigintmat * bimCopy(const bigintmat * b);
6163
6164
6165
6166int getShorter (int * a, int l, int j, int cols, int rows);
6167int findLonges(int * a, int length);
6168int intArrSum(int * a, int length);
6169
6170bigintmat * iv2bim(intvec * b);
6171# 11 "bigintmat.cc" 2
6172# 1 "../omalloc/omalloc.h" 1
6173# 12 "bigintmat.cc" 2
6174
6175
6176# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 1 3 4
6177# 24 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6178#pragma ident "@(#)math.h       2.24    04/10/23 SMI"
6179
6180# 1 "/usr/include/iso/math_iso.h" 1 3 4
6181# 9 "/usr/include/iso/math_iso.h" 3 4
6182#pragma ident "@(#)math_iso.h   1.9     04/10/23 SMI"
6183
6184
6185
6186
6187extern "C" {
6188# 44 "/usr/include/iso/math_iso.h" 3 4
6189extern double acos (double);
6190extern double asin (double);
6191extern double atan (double);
6192extern double atan2 (double, double);
6193extern double cos (double);
6194extern double sin (double);
6195extern double tan (double);
6196
6197extern double cosh (double);
6198extern double sinh (double);
6199extern double tanh (double);
6200
6201extern double exp (double);
6202extern double frexp (double, int *);
6203extern double ldexp (double, int);
6204extern double log (double);
6205extern double log10 (double);
6206extern double modf (double, double *);
6207
6208extern double pow (double, double);
6209extern double sqrt (double);
6210
6211extern double ceil (double);
6212extern double fabs (double);
6213extern double floor (double);
6214extern double fmod (double, double);
6215# 208 "/usr/include/iso/math_iso.h" 3 4
6216}
6217# 27 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 2 3 4
6218# 1 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/iso/math_c99.h" 1 3 4
6219# 18 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/iso/math_c99.h" 3 4
6220#pragma ident "@(#)math_c99.h   1.9     04/11/01 SMI"
6221
6222
6223
6224
6225extern "C" {
6226# 88 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/iso/math_c99.h" 3 4
6227typedef float float_t;
6228typedef double double_t;
6229# 127 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/iso/math_c99.h" 3 4
6230extern double acosh (double);
6231extern double asinh (double);
6232extern double atanh (double);
6233
6234extern double exp2 (double);
6235extern double expm1 (double);
6236extern int ilogb (double);
6237extern double log1p (double);
6238extern double log2 (double);
6239extern double logb (double);
6240extern double scalbn (double, int);
6241extern double scalbln (double, long int);
6242
6243extern double cbrt (double);
6244extern double hypot (double, double);
6245
6246extern double erf (double);
6247extern double erfc (double);
6248extern double lgamma (double);
6249extern double tgamma (double);
6250
6251extern double nearbyint (double);
6252extern double rint (double);
6253extern long int lrint (double);
6254extern double round (double);
6255extern long int lround (double);
6256extern double trunc (double);
6257
6258extern double remainder (double, double);
6259extern double remquo (double, double, int *);
6260
6261extern double copysign (double, double);
6262extern double nan (const char *);
6263extern double nextafter (double, double);
6264extern double nexttoward (double, long double);
6265
6266extern double fdim (double, double);
6267extern double fmax (double, double);
6268extern double fmin (double, double);
6269
6270extern double fma (double, double, double);
6271
6272extern float acosf (float);
6273extern float asinf (float);
6274extern float atanf (float);
6275extern float atan2f (float, float);
6276extern float cosf (float);
6277extern float sinf (float);
6278extern float tanf (float);
6279
6280extern float acoshf (float);
6281extern float asinhf (float);
6282extern float atanhf (float);
6283extern float coshf (float);
6284extern float sinhf (float);
6285extern float tanhf (float);
6286
6287extern float expf (float);
6288extern float exp2f (float);
6289extern float expm1f (float);
6290extern float frexpf (float, int *);
6291extern int ilogbf (float);
6292extern float ldexpf (float, int);
6293extern float logf (float);
6294extern float log10f (float);
6295extern float log1pf (float);
6296extern float log2f (float);
6297extern float logbf (float);
6298extern float modff (float, float *);
6299extern float scalbnf (float, int);
6300extern float scalblnf (float, long int);
6301
6302extern float cbrtf (float);
6303extern float fabsf (float);
6304extern float hypotf (float, float);
6305extern float powf (float, float);
6306extern float sqrtf (float);
6307
6308extern float erff (float);
6309extern float erfcf (float);
6310extern float lgammaf (float);
6311extern float tgammaf (float);
6312
6313extern float ceilf (float);
6314extern float floorf (float);
6315extern float nearbyintf (float);
6316extern float rintf (float);
6317extern long int lrintf (float);
6318extern float roundf (float);
6319extern long int lroundf (float);
6320extern float truncf (float);
6321
6322extern float fmodf (float, float);
6323extern float remainderf (float, float);
6324extern float remquof (float, float, int *);
6325
6326extern float copysignf (float, float);
6327extern float nanf (const char *);
6328extern float nextafterf (float, float);
6329extern float nexttowardf (float, long double);
6330
6331extern float fdimf (float, float);
6332extern float fmaxf (float, float);
6333extern float fminf (float, float);
6334
6335extern float fmaf (float, float, float);
6336
6337extern long double acosl (long double);
6338extern long double asinl (long double);
6339extern long double atanl (long double);
6340extern long double atan2l (long double, long double);
6341extern long double cosl (long double);
6342extern long double sinl (long double);
6343extern long double tanl (long double);
6344
6345extern long double acoshl (long double);
6346extern long double asinhl (long double);
6347extern long double atanhl (long double);
6348extern long double coshl (long double);
6349extern long double sinhl (long double);
6350extern long double tanhl (long double);
6351
6352extern long double expl (long double);
6353extern long double exp2l (long double);
6354extern long double expm1l (long double);
6355extern long double frexpl (long double, int *);
6356extern int ilogbl (long double);
6357extern long double ldexpl (long double, int);
6358extern long double logl (long double);
6359extern long double log10l (long double);
6360extern long double log1pl (long double);
6361extern long double log2l (long double);
6362extern long double logbl (long double);
6363extern long double modfl (long double, long double *);
6364extern long double scalbnl (long double, int);
6365extern long double scalblnl (long double, long int);
6366
6367extern long double cbrtl (long double);
6368extern long double fabsl (long double);
6369extern long double hypotl (long double, long double);
6370extern long double powl (long double, long double);
6371extern long double sqrtl (long double);
6372
6373extern long double erfl (long double);
6374extern long double erfcl (long double);
6375extern long double lgammal (long double);
6376extern long double tgammal (long double);
6377
6378extern long double ceill (long double);
6379extern long double floorl (long double);
6380extern long double nearbyintl (long double);
6381extern long double rintl (long double);
6382extern long int lrintl (long double);
6383extern long double roundl (long double);
6384extern long int lroundl (long double);
6385extern long double truncl (long double);
6386
6387extern long double fmodl (long double, long double);
6388extern long double remainderl (long double, long double);
6389extern long double remquol (long double, long double, int *);
6390
6391extern long double copysignl (long double, long double);
6392extern long double nanl (const char *);
6393extern long double nextafterl (long double, long double);
6394extern long double nexttowardl (long double, long double);
6395
6396extern long double fdiml (long double, long double);
6397extern long double fmaxl (long double, long double);
6398extern long double fminl (long double, long double);
6399
6400extern long double fmal (long double, long double, long double);
6401
6402
6403
6404extern long long int llrint (double);
6405extern long long int llround (double);
6406
6407extern long long int llrintf (float);
6408extern long long int llroundf (float);
6409
6410extern long long int llrintl (long double);
6411extern long long int llroundl (long double);
6412# 438 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/iso/math_c99.h" 3 4
6413}
6414# 28 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 2 3 4
6415# 56 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6416extern "C" {
6417# 90 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6418extern int signgam;
6419
6420
6421
6422
6423
6424
6425
6426enum version {libm_ieee = -1, c_issue_4, ansi_1, strict_ansi};
6427
6428
6429extern const enum version _lib_version;
6430
6431
6432
6433
6434struct __math_exception {
6435 int type;
6436 char *name;
6437 double arg1;
6438 double arg2;
6439 double retval;
6440};
6441# 144 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6442extern double erf (double);
6443extern double erfc (double);
6444extern double hypot (double, double);
6445extern double lgamma (double);
6446# 165 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6447extern double gamma (double);
6448
6449extern double j0 (double);
6450extern double j1 (double);
6451extern double jn (int, double);
6452extern double y0 (double);
6453extern double y1 (double);
6454extern double yn (int, double);
6455# 185 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6456extern double scalb (double, double);
6457# 194 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6458extern double acosh (double);
6459extern double asinh (double);
6460extern double atanh (double);
6461extern double cbrt (double);
6462extern double logb (double);
6463extern double nextafter (double, double);
6464extern double remainder (double, double);
6465
6466
6467
6468
6469extern double expm1 (double);
6470extern int ilogb (double);
6471extern double log1p (double);
6472extern double rint (double);
6473# 228 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6474extern int matherr (struct __math_exception *);
6475
6476
6477
6478
6479extern double significand (double);
6480
6481
6482
6483
6484
6485
6486
6487extern int signgamf;
6488extern int signgaml;
6489
6490extern int isnanf (float);
6491extern int isnanl (long double);
6492extern float gammaf (float);
6493extern float gammaf_r (float, int *);
6494extern float j0f (float);
6495extern float j1f (float);
6496extern float jnf (int, float);
6497extern float lgammaf_r (float, int *);
6498extern float scalbf (float, float);
6499extern float significandf (float);
6500extern float y0f (float);
6501extern float y1f (float);
6502extern float ynf (int, float);
6503extern long double gammal (long double);
6504extern long double gammal_r (long double, int *);
6505extern long double j0l (long double);
6506extern long double j1l (long double);
6507extern long double jnl (int, long double);
6508extern long double lgammal_r (long double, int *);
6509extern long double scalbl (long double, long double);
6510extern long double significandl (long double);
6511extern long double y0l (long double);
6512extern long double y1l (long double);
6513extern long double ynl (int, long double);
6514# 290 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6515extern void sincos (double, double *, double *);
6516extern void sincosf (float, float *, float *);
6517extern void sincosl (long double, long double *, long double *);
6518# 302 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6519extern double copysign (double, double);
6520extern double scalbn (double, int);
6521# 316 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6522extern double gamma_r (double, int *);
6523extern double lgamma_r (double, int *);
6524
6525
6526
6527
6528
6529
6530extern float modff (float, float *);
6531
6532
6533
6534
6535
6536
6537
6538# 1 "/usr/include/floatingpoint.h" 1 3 4
6539# 16 "/usr/include/floatingpoint.h" 3 4
6540#pragma ident "@(#)floatingpoint.h      2.9     04/10/23 SMI"
6541
6542
6543
6544
6545# 1 "/usr/include/sys/ieeefp.h" 1 3 4
6546# 9 "/usr/include/sys/ieeefp.h" 3 4
6547#pragma ident "@(#)ieeefp.h     2.12    04/10/23 SMI"
6548
6549
6550extern "C" {
6551
6552
6553
6554
6555
6556
6557enum fp_direction_type {
6558 fp_nearest = 0,
6559 fp_tozero = 1,
6560 fp_positive = 2,
6561 fp_negative = 3
6562};
6563
6564enum fp_precision_type {
6565 fp_extended = 0,
6566 fp_single = 1,
6567 fp_double = 2,
6568 fp_precision_3 = 3
6569};
6570
6571enum fp_exception_type {
6572 fp_inexact = 0,
6573 fp_division = 1,
6574 fp_underflow = 2,
6575 fp_overflow = 3,
6576 fp_invalid = 4
6577};
6578
6579enum fp_trap_enable_type {
6580 fp_trap_inexact = 0,
6581 fp_trap_division = 1,
6582 fp_trap_underflow = 2,
6583 fp_trap_overflow = 3,
6584 fp_trap_invalid = 4
6585};
6586# 84 "/usr/include/sys/ieeefp.h" 3 4
6587enum fp_class_type {
6588 fp_zero = 0,
6589 fp_subnormal = 1,
6590 fp_normal = 2,
6591 fp_infinity = 3,
6592 fp_quiet = 4,
6593 fp_signaling = 5
6594};
6595
6596
6597}
6598# 22 "/usr/include/floatingpoint.h" 2 3 4
6599
6600
6601extern "C" {
6602# 55 "/usr/include/floatingpoint.h" 3 4
6603typedef int sigfpe_code_type;
6604
6605typedef void (*sigfpe_handler_type)();
6606
6607
6608
6609
6610
6611extern sigfpe_handler_type sigfpe (sigfpe_code_type, sigfpe_handler_type);
6612
6613
6614
6615
6616typedef float single;
6617
6618
6619
6620typedef unsigned extended[3];
6621
6622
6623typedef long double quadruple;
6624
6625typedef unsigned fp_exception_field_type;
6626# 87 "/usr/include/floatingpoint.h" 3 4
6627typedef char decimal_string[512];
6628
6629
6630typedef struct {
6631 enum fp_class_type fpclass;
6632 int sign;
6633 int exponent;
6634 decimal_string ds;
6635
6636
6637 int more;
6638
6639
6640 int ndigits;
6641
6642
6643} decimal_record;
6644
6645enum decimal_form {
6646 fixed_form,
6647
6648
6649
6650 floating_form
6651
6652};
6653
6654typedef struct {
6655 enum fp_direction_type rd;
6656
6657 enum decimal_form df;
6658
6659 int ndigits;
6660} decimal_mode;
6661
6662enum decimal_string_form {
6663 invalid_form,
6664 whitespace_form,
6665 fixed_int_form,
6666 fixed_intdot_form,
6667 fixed_dotfrac_form,
6668 fixed_intdotfrac_form,
6669 floating_int_form,
6670 floating_intdot_form,
6671 floating_dotfrac_form,
6672 floating_intdotfrac_form,
6673 inf_form,
6674 infinity_form,
6675 nan_form,
6676 nanstring_form
6677};
6678
6679extern void single_to_decimal (single *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6680                               ;
6681extern void double_to_decimal (double *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6682                               ;
6683extern void extended_to_decimal (extended *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6684                                                 ;
6685extern void quadruple_to_decimal (quadruple *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6686                                                 ;
6687
6688extern void decimal_to_single (single *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6689                               ;
6690extern void decimal_to_double (double *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6691                               ;
6692extern void decimal_to_extended (extended *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6693                                                 ;
6694extern void decimal_to_quadruple (quadruple *, decimal_mode *, decimal_record *, fp_exception_field_type *)
6695                                                 ;
6696
6697extern void string_to_decimal (char **, int, int, decimal_record *, enum decimal_string_form *, char **)
6698                                         ;
6699extern void func_to_decimal (char **, int, int, decimal_record *, enum decimal_string_form *, char **, int (*)(void), int *, int (*)(int))
6700
6701                                        ;
6702extern void file_to_decimal (char **, int, int, decimal_record *, enum decimal_string_form *, char **, FILE *, int *)
6703
6704                   ;
6705
6706extern char *seconvert (single *, int, int *, int *, char *);
6707extern char *sfconvert (single *, int, int *, int *, char *);
6708extern char *sgconvert (single *, int, int, char *);
6709extern char *econvert (double, int, int *, int *, char *);
6710extern char *fconvert (double, int, int *, int *, char *);
6711extern char *gconvert (double, int, int, char *);
6712extern char *qeconvert (quadruple *, int, int *, int *, char *);
6713extern char *qfconvert (quadruple *, int, int *, int *, char *);
6714extern char *qgconvert (quadruple *, int, int, char *);
6715
6716extern char *ecvt (double, int, int *, int *);
6717extern char *fcvt (double, int, int *, int *);
6718extern char *gcvt (double, int, char *);
6719
6720
6721
6722
6723
6724extern double atof (const char *);
6725extern double strtod (const char *, char **);
6726
6727
6728}
6729# 333 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 2 3 4
6730# 342 "/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-solaris2.10/4.6.3/include-fixed/math.h" 3 4
6731}
6732# 15 "bigintmat.cc" 2
6733
6734
6735
6736
6737
6738void bigintmat::set(int i, int j, number n)
6739{
6740  nlDelete(&((*this)[(i-1)*(*this).cols()+j-1]), __null);
6741  (*this)[(i-1)*(*this).cols()+j-1] = nlCopy(n);
6742}
6743
6744
6745void bigintmat::set(int i, number n)
6746{
6747  if (i<row*col)
6748  {
6749    nlDelete(&(v[i]), __null);
6750    v[i] = nlCopy(n);
6751  }
6752}
6753
6754number bigintmat::get(int i, int j)
6755{
6756  return nlCopy(v[(i-1)*col+j-1]);
6757}
6758
6759number bigintmat::get(int i)
6760{
6761  return nlCopy(v[i]);
6762}
6763
6764bigintmat::bigintmat(int r, int c)
6765{
6766  row = r;
6767  col = c;
6768  int l = r*c;
6769  if (l>0)
6770    v = (number *)_omAlloc(sizeof(number)*l);
6771  else
6772    v = __null;
6773  for (int i=0; i<l; i++)
6774  {
6775    v[i] = nlInit(0, __null);
6776  }
6777}
6778
6779void bigintmat::operator*=(int intop)
6780{
6781  number iop = nlInit(intop, __null);
6782  for (int i=0; i<row*col; i++)
6783  {
6784          number prod = nlMult(v[i], iop);
6785          nlDelete(&(v[i]), __null);
6786          v[i] = prod;
6787  }
6788  nlDelete(&iop, __null);
6789}
6790
6791void bigintmat::operator*=(number bintop)
6792{
6793  for (int i=0; i<row*col; i++)
6794  {
6795          number prod = nlMult(v[i], bintop);
6796          nlDelete(&(v[i]), __null);
6797          v[i] = prod;
6798  }
6799}
6800
6801void bigintmat::operator-=(int intop)
6802{
6803  number iop = nlInit(intop, __null);
6804  for (int i=0; i<row*col; i++)
6805  {
6806          number diff = nlSub(v[i], iop);
6807          nlDelete(&(v[i]), __null);
6808          v[i] = diff;
6809  }
6810  nlDelete(&iop, __null);
6811}
6812
6813void bigintmat::operator-=(number bintop)
6814{
6815  for (int i=0; i<row*col; i++)
6816  {
6817          number diff = nlSub(v[i], bintop);
6818          nlDelete(&(v[i]), __null);
6819          v[i] = diff;
6820  }
6821}
6822
6823void bigintmat::operator+=(int intop)
6824{
6825  number iop = nlInit(intop, __null);
6826  for (int i=0; i<row*col; i++)
6827  {
6828          number sum = nlAdd(v[i], iop);
6829          nlDelete(&(v[i]), __null);
6830          v[i] = sum;
6831  }
6832  nlDelete(&iop, __null);
6833}
6834
6835void bigintmat::operator+=(number bintop)
6836{
6837  for (int i=0; i<row*col; i++)
6838  {
6839          number sum = nlAdd(v[i], bintop);
6840          nlDelete(&(v[i]), __null);
6841          v[i] = sum;
6842  }
6843}
6844
6845
6846
6847
6848
6849bool operator==(bigintmat & lhr, bigintmat & rhr)
6850{
6851  if (&lhr == &rhr) { return true; }
6852  if (lhr.cols() != rhr.cols()) { return false; }
6853  if (lhr.rows() != rhr.rows()) { return false; }
6854  for (int i=0; i<(lhr.rows())*(lhr.cols()); i++)
6855  {
6856    if (!nlEqual(lhr[i], rhr[i])) { return false; }
6857  }
6858  return true;
6859}
6860
6861bool operator!=(bigintmat & lhr, bigintmat & rhr)
6862{
6863  return !(lhr==rhr);
6864}
6865
6866
6867bigintmat * bimAdd(bigintmat * a, bigintmat * b)
6868{
6869  bigintmat * bim;
6870  int mn, ma, i;
6871  if (a->cols() != b->cols()) return __null;
6872  if (a->rows() != b->rows()) return __null;
6873  bim = new bigintmat(a->rows(), a->cols());
6874  for (i=0; i<a->rows()*a->cols(); i++)
6875  {
6876    number n = nlAdd((*a)[i], (*b)[i]);
6877    nlDelete(&(*bim)[i], __null);
6878    (*bim)[i]=n;
6879  }
6880  return bim;
6881}
6882
6883bigintmat * bimSub(bigintmat * a, bigintmat * b)
6884{
6885  bigintmat * bim;
6886  int mn, ma, i;
6887  if (a->cols() != b->cols()) return __null;
6888  if (a->rows() != b->rows()) return __null;
6889  bim = new bigintmat(a->rows(), a->cols());
6890  for (i=0; i<a->rows()*a->cols(); i++)
6891  {
6892    number n = nlSub((*a)[i], (*b)[i]);
6893    nlDelete(&(*bim)[i], __null);
6894    (*bim)[i]=n;
6895  }
6896  return bim;
6897}
6898
6899bigintmat * bimMult(bigintmat * a, bigintmat * b)
6900{
6901  int i, j, k,
6902      ra = a->rows(), ca = a->cols(),
6903      rb = b->rows(), cb = b->cols();
6904  number sum;
6905  bigintmat * bim;
6906  if (ca != rb) return __null;
6907  bim = new bigintmat(ra, cb);
6908  for (i=1; i<=ra; i++)
6909  {
6910    for (j=1; j<=cb; j++)
6911    {
6912      sum = nlInit(0, __null);
6913      for (k=1; k<=ca; k++)
6914      {
6915        number prod = nlMult(((*a))[(i-1)*((*a)).cols()+k-1], ((*b))[(k-1)*((*b)).cols()+j-1]);
6916        number sum2 = nlAdd(sum, prod);
6917        nlDelete(&sum, __null);
6918        sum = sum2;
6919        nlDelete(&prod, __null);
6920      }
6921      nlDelete(&((*bim))[(i-1)*((*bim)).cols()+j-1],__null);
6922      ((*bim))[(i-1)*((*bim)).cols()+j-1]=sum;
6923    }
6924  }
6925  return bim;
6926}
6927
6928
6929
6930intvec * bim2iv(bigintmat * b)
6931{
6932  intvec * iv;
6933  iv = new intvec(b->rows(), b->cols(), 0);
6934  for (int i=0; i<(b->rows())*(b->cols()); i++) { (*iv)[i] = nlInt((*b)[i], __null); }
6935  return iv;
6936}
6937
6938bigintmat * iv2bim(intvec * b)
6939{
6940  bigintmat * bim;
6941  bim = new bigintmat(b->rows(), b->cols());
6942  for (int i=0; i<(b->rows())*(b->cols()); i++)
6943  {
6944    number n = nlInit((*b)[i], __null);
6945    bim->set(i, n);
6946    nlDelete(&n, __null);
6947  }
6948  return bim;
6949}
6950
6951int bigintmat::compare(const bigintmat* op) const
6952{
6953  if ((col!=1) ||(op->cols()!=1))
6954  {
6955    if((col!=op->cols())
6956    || (row!=op->rows()))
6957      return -2;
6958  }
6959  int i;
6960  for (i=0; i<si_min(row*col,op->rows()*op->cols()); i++)
6961  {
6962    if (nlGreater(v[i], (*op)[i]))
6963      return 1;
6964    else if (!nlEqual(v[i], (*op)[i]))
6965      return -1;
6966  }
6967
6968  for (; i<row; i++)
6969  {
6970    if (nlGreaterZero(v[i]))
6971      return 1;
6972    else if (!nlIsZero(v[i]))
6973      return -1;
6974  }
6975  for (; i<op->rows(); i++)
6976  {
6977    if (nlGreaterZero((*op)[i]))
6978      return -1;
6979    else if (!nlIsZero((*op)[i]))
6980      return 1;
6981  }
6982  return 0;
6983}
6984
6985
6986bigintmat * bimCopy(const bigintmat * b)
6987{
6988  bigintmat * a=__null;
6989  if (b!=__null)
6990  {
6991    a = new bigintmat(b->rows(), b->cols());
6992    for (int i=0; i<(b->rows())*(b->cols()); i++)
6993    {
6994      a->set(i, (*b)[i]);
6995    }
6996  }
6997  return a;
6998}
6999
7000bigintmat * bigintmat::transpose()
7001{
7002  bigintmat * t = new bigintmat(col, row);
7003  for (int i=1; i<=row; i++)
7004  {
7005    for (int j=1; j<=col; j++)
7006    {
7007      t->set(j, i, (*this)[(i-1)*(*this).cols()+j-1]);
7008    }
7009  }
7010  return t;
7011}
7012
7013char* bigintmat::String()
7014{
7015  StringSetS("");
7016  int i;
7017  for (i=0; i<col*row-1; i++)
7018  {
7019    nlWrite(v[i], __null);
7020    StringAppendS(",");
7021  }
7022  if ((col!=0) && (row!=0))
7023    nlWrite(v[i], __null);
7024
7025
7026
7027
7028
7029
7030  return StringAppendS("");
7031}
7032
7033int intArrSum(int * a, int length)
7034{
7035  int sum = 0;
7036  for (int i=0; i<length; i++)
7037    sum += a[i];
7038  return sum;
7039}
7040
7041
7042int findLongest(int * a, int length)
7043{
7044  int l = 0;
7045  int index;
7046  for (int i=0; i<length; i++)
7047  {
7048    if (a[i] > l)
7049    {
7050      l = a[i];
7051      index = i;
7052    }
7053  }
7054  return index;
7055}
7056
7057int getShorter (int * a, int l, int j, int cols, int rows)
7058{
7059  int sndlong = 0;
7060  for (int i=0; i<rows; i++)
7061  {
7062    int index = cols*i+j;
7063    if ((a[index] > sndlong) && (a[index] < l))
7064    {
7065      int min = floor(log10((double)cols))+floor(log10((double)rows))+5;
7066      if ((a[index] < min) && (min < l))
7067        sndlong = min;
7068      else
7069        sndlong = a[index];
7070    }
7071  }
7072  if (sndlong == 0)
7073  {
7074    int min = floor(log10((double)cols))+floor(log10((double)rows))+5;
7075    if (min < l)
7076      sndlong = min;
7077    else
7078      sndlong = l-1;
7079  }
7080  return sndlong;
7081}
7082
7083int * bigintmat::getwid(int maxwid)
7084{
7085  int const c = 2*(col-1)+1;
7086  if (col + c > maxwid-1) { return __null; }
7087  int * wv = (int*)_omAlloc(sizeof(int)*col*row);
7088  int * cwv = (int*)_omAlloc(sizeof(int)*col);
7089  for (int j=0; j<col; j++)
7090  {
7091    cwv[j] = 0;
7092    for (int i=0; i<row; i++)
7093    {
7094      StringSetS("");
7095      nlWrite(v[col*i+j], __null);
7096      char * tmp = StringAppendS("");
7097      char * ts = _omStrDup(tmp);
7098      int nl = strlen(ts);
7099      wv[col*i+j] = nl;
7100      if (nl > cwv[j])
7101        cwv[j] = nl;
7102    }
7103  }
7104
7105
7106  while (intArrSum(cwv, col)+c > maxwid)
7107  {
7108    int j = findLongest(cwv, col);
7109    cwv[j] = getShorter(wv, cwv[j], j, col, row);
7110  }
7111  do { if (_omIsBinPageAddr(wv)) { do { register void* __om_addr = (void*) (wv); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { omFreeLarge(wv); } } while (0);
7112  return cwv;
7113}
7114
7115void bigintmat::pprint(int maxwid)
7116{
7117  if ((col==0) || (row==0))
7118    PrintS("");
7119  else
7120  {
7121    int * colwid = getwid(maxwid);
7122    if (colwid == __null)
7123    {
7124      WerrorS("not enough space to print bigintmat");
7125      return;
7126    }
7127    char * ps;
7128    int slength = 0;
7129    for (int j=0; j<col; j++)
7130      slength += colwid[j]*row;
7131    slength += 2*(col-1)*row+row;
7132    ps = (char*) _omAlloc0(sizeof(char)*(slength));
7133    int pos = 0;
7134    for (int i=0; i<col*row; i++)
7135    {
7136      StringSetS("");
7137      nlWrite(v[i], __null);
7138      char * temp = StringAppendS("");
7139      char * ts = _omStrDup(temp);
7140      int nl = strlen(ts);
7141      int cj = i%col;
7142      if (nl > colwid[cj])
7143      {
7144        StringSetS("");
7145        int ci = floor((double)(i/col));
7146        StringAppend("[%d,%d]", ci+1, cj+1);
7147        char *tmp = StringAppendS("");
7148        char * ph = _omStrDup(tmp);
7149        int phl = strlen(ph);
7150        if (phl > colwid[cj])
7151        {
7152          for (int j=0; j<colwid[cj]; j++)
7153            ps[pos+j] = '*';
7154        }
7155        else
7156        {
7157          for (int j=0; j<colwid[cj]-phl; j++)
7158            ps[pos+j] = ' ';
7159          for (int j=0; j<phl; j++)
7160            ps[pos+colwid[cj]-phl+j] = ph[j];
7161        }
7162        do { if (_omIsBinPageAddr(ph)) { do { register void* __om_addr = (void*) (ph); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { omFreeLarge(ph); } } while (0);
7163      }
7164      else
7165      {
7166        for (int j=0; j<colwid[cj]-nl; j++)
7167          ps[pos+j] = ' ';
7168        for (int j=0; j<nl; j++)
7169          ps[pos+colwid[cj]-nl+j] = ts[j];
7170      }
7171
7172      if ((i+1)%col == 0)
7173      {
7174        if (i != col*row-1)
7175        {
7176          ps[pos+colwid[cj]] = '\n';
7177          pos += colwid[cj]+1;
7178        }
7179      }
7180      else
7181      {
7182        ps[pos+colwid[cj]] = ',';
7183        ps[pos+colwid[cj]+1] = ' ';
7184        pos += colwid[cj]+2;
7185      }
7186    do { if (_omIsBinPageAddr(ts)) { do { register void* __om_addr = (void*) (ts); register omBinPage __om_page = ((omBinPage) ((long) (__om_addr) & ~(8192 -1))); do { if ((__om_page)->used_blocks > 0L) { *((void**) (__om_addr)) = (__om_page)->current; ((__om_page)->used_blocks)--; (__om_page)->current = (__om_addr); } else { omFreeToPageFault(__om_page, __om_addr); } } while (0); } while (0); } else { omFreeLarge(ts); } } while (0);
7187    }
7188    PrintS(ps);
7189
7190  }
7191}
7192
7193
7194static void bimRowContent(bigintmat *bimat, int rowpos, int colpos)
7195{
7196  number tgcd, m;
7197  int i=bimat->cols();
7198
7199  for(;;)
7200  {
7201    tgcd = nlCopy((*bimat)[(rowpos-1)*(*bimat).cols()+i---1]);
7202    if (!nlIsZero(tgcd)) break;
7203    if (i<colpos) return;
7204  }
7205  if ((!nlGreaterZero(tgcd)) && (!nlIsZero(tgcd))) tgcd = nlNeg(tgcd);
7206  if (nlIsOne(tgcd)) return;
7207  for(;;)
7208  {
7209    m = (*bimat)[(rowpos-1)*(*bimat).cols()+i---1];
7210    if (!nlIsZero(m))
7211    {
7212      number tp1 = nlGcd(tgcd, m, __null);
7213      nlDelete(&tgcd, __null);
7214      tgcd = tp1;
7215    }
7216    if (nlIsOne(tgcd)) return;
7217    if (i<colpos) break;
7218  }
7219  for (i=bimat->cols();i>=colpos;i--)
7220  {
7221    number tp2 = nlDiv((*bimat)[(rowpos-1)*(*bimat).cols()+i-1], tgcd);
7222    nlDelete(&(*bimat)[(rowpos-1)*(*bimat).cols()+i-1], __null);
7223    (*bimat)[(rowpos-1)*(*bimat).cols()+i-1] = tp2;
7224  }
7225  nlDelete(&tgcd, __null);
7226}
7227
7228static void bimReduce(bigintmat *bimat, int rpiv, int colpos,
7229                     int ready, int all)
7230{
7231  number tgcd, ce, m1, m2;
7232  int j, i;
7233  number piv = (*bimat)[(rpiv-1)*(*bimat).cols()+colpos-1];
7234
7235  for (j=all;j>ready;j--)
7236  {
7237    ce = nlCopy((*bimat)[(j-1)*(*bimat).cols()+colpos-1]);
7238    if (!nlIsZero(ce))
7239    {
7240      nlDelete(&(*bimat)[(j-1)*(*bimat).cols()+colpos-1], __null);
7241      (*bimat)[(j-1)*(*bimat).cols()+colpos-1] = nlInit(0, __null);
7242      m1 = nlCopy(piv);
7243      m2 = nlCopy(ce);
7244      tgcd = nlGcd(m1, m2, __null);
7245      if (!nlIsOne(tgcd))
7246      {
7247        number tp1 = nlDiv(m1, tgcd);
7248        number tp2 = nlDiv(m2, tgcd);
7249        nlDelete(&m1, __null);
7250        nlDelete(&m2, __null);
7251        m1 = tp1;
7252        m2 = tp2;
7253      }
7254      for (i=bimat->cols();i>colpos;i--)
7255      {
7256        nlDelete(&(*bimat)[(j-1)*(*bimat).cols()+i-1], __null);
7257        number tp1 = nlMult((*bimat)[(j-1)*(*bimat).cols()+i-1], m1);
7258        number tp2 = nlMult((*bimat)[(rpiv-1)*(*bimat).cols()+i-1], m2);
7259        (*bimat)[(j-1)*(*bimat).cols()+i-1] = nlSub(tp1, tp2);
7260        nlDelete(&tp1, __null);
7261        nlDelete(&tp2, __null);
7262      }
7263      bimRowContent(bimat, j, colpos+1);
7264      nlDelete(&m1, __null);
7265      nlDelete(&m2, __null);
7266    }
7267    nlDelete(&ce, __null);
7268  }
7269}