Annotation of OpenXM_contrib2/asir2000/parse/glob.c, Revision 1.19
1.8 noro 1: /*
2: * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
3: * All rights reserved.
4: *
5: * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
6: * non-exclusive and royalty-free license to use, copy, modify and
7: * redistribute, solely for non-commercial and non-profit purposes, the
8: * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
9: * conditions of this Agreement. For the avoidance of doubt, you acquire
10: * only a limited right to use the SOFTWARE hereunder, and FLL or any
11: * third party developer retains all rights, including but not limited to
12: * copyrights, in and to the SOFTWARE.
13: *
14: * (1) FLL does not grant you a license in any way for commercial
15: * purposes. You may use the SOFTWARE only for non-commercial and
16: * non-profit purposes only, such as academic, research and internal
17: * business use.
18: * (2) The SOFTWARE is protected by the Copyright Law of Japan and
19: * international copyright treaties. If you make copies of the SOFTWARE,
20: * with or without modification, as permitted hereunder, you shall affix
21: * to all such copies of the SOFTWARE the above copyright notice.
22: * (3) An explicit reference to this SOFTWARE and its copyright owner
23: * shall be made on your publication or presentation in any form of the
24: * results obtained by use of the SOFTWARE.
25: * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
1.9 noro 26: * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.8 noro 27: * for such modification or the source code of the modified part of the
28: * SOFTWARE.
29: *
30: * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
31: * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
32: * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
33: * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
34: * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
35: * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
36: * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
37: * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
38: * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
39: * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
40: * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
41: * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
42: * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
43: * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
44: * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
45: * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
46: * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
47: *
1.19 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.18 2001/06/04 02:49:48 noro Exp $
1.8 noro 49: */
1.1 noro 50: #include "ca.h"
51: #include "al.h"
52: #include "parse.h"
53: #if PARI
54: #include "genpari.h"
55: #endif
1.12 noro 56: #if !defined(VISUAL) && !defined(_PA_RISC1_1) && !defined(linux) && !defined(SYSV)
1.1 noro 57: #include <sgtty.h>
58: #endif
59:
60: #if defined(VISUAL)
61: #include <io.h>
62: #include <direct.h>
63: #endif
64:
1.19 ! noro 65: #if defined(SYSV) && !defined(_IBMR2)
1.1 noro 66: #include <sys/ttold.h>
67: #endif
68:
69: #if defined(VISUAL)
70: #define HISTORY asir_history
71: #endif
1.12 noro 72:
1.1 noro 73: #define MAXHIST 100
74:
75: extern int GC_free_space_divisor;
76: extern int GC_free_space_numerator;
77: extern FILE *asir_out;
78:
79: IN asir_infile;
80: jmp_buf env,debug_env,timer_env;
81: int little_endian,debug_mode;
82: char *asir_libdir;
83: char *asir_pager;
84:
85: NODE usrf,sysf,noargsysf,ubinf,parif;
86: NODE ONENODE;
87: int main_parser, ox_do_copy, ox_do_count, ox_count_length;
88: int ox_file_io, ox_need_conv;
89: char *ox_copy_bptr;
90: char *parse_strp;
91: SNODE parse_snode;
92: FUNC parse_targetf;
93: FILE *ox_istream,*ox_ostream;
94: int do_server_in_X11;
95: Obj LastVal;
96: char LastError[BUFSIZ];
1.15 noro 97: int timer_is_set;
98:
1.1 noro 99:
100: struct oV oVAR[] = {
101: {"x",0,0}, {"y",0,0}, {"z",0,0}, {"u",0,0},
102: {"v",0,0}, {"w",0,0}, {"p",0,0}, {"q",0,0},
103: {"r",0,0}, {"s",0,0}, {"t",0,0}, {"a",0,0},
104: {"b",0,0}, {"c",0,0}, {"d",0,0}, {"e",0,0},
105: {"f",0,0}, {"g",0,0}, {"h",0,0}, {"i",0,0},
106: {"j",0,0}, {"k",0,0}, {"l",0,0}, {"m",0,0},
107: {"n",0,0}, {"o",0,0},
108: {"_x",0,0}, {"_y",0,0}, {"_z",0,0}, {"_u",0,0},
109: {"_v",0,0}, {"_w",0,0}, {"_p",0,0}, {"_q",0,0},
110: {"_r",0,0}, {"_s",0,0}, {"_t",0,0}, {"_a",0,0},
111: {"_b",0,0}, {"_c",0,0}, {"_d",0,0}, {"_e",0,0},
112: {"_f",0,0}, {"_g",0,0}, {"_h",0,0}, {"_i",0,0},
113: {"_j",0,0}, {"_k",0,0}, {"_l",0,0}, {"_m",0,0},
114: {"_n",0,0}, {"_o",0,0}
115: };
116:
117: struct oVL oVLIST[52];
118:
119: VL CO = oVLIST;
120: VL ALG;
121:
122: struct oVS oGPVS,oAPVS,oEPVS;
123: VS GPVS = &oGPVS;
124: VS APVS = &oAPVS;
125: VS EPVS = &oEPVS;
126: VS CPVS;
127:
128: struct oF oF_TRUE,oF_FALSE;
129: F F_TRUE = &oF_TRUE;
130: F F_FALSE = &oF_FALSE;
131:
132: #if defined(__SVR4) && defined(sun)
1.4 noro 133: char cppname[BUFSIZ] = "/usr/ccs/lib/cpp ";
1.1 noro 134: #else
1.18 noro 135: #if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__MACH__) && defined(__ppc__))
1.4 noro 136: char cppname[BUFSIZ] = "/usr/bin/cpp ";
1.1 noro 137: #else
138: #if defined(VISUAL)
1.4 noro 139: char cppname[BUFSIZ] = "c:\\asir\\stdlib\\cpp ";
1.1 noro 140: #else
1.4 noro 141: char cppname[BUFSIZ] = "/lib/cpp ";
1.1 noro 142: #endif
143: #endif
144: #endif
1.4 noro 145: char asirname[BUFSIZ];
1.1 noro 146: char displayname[BUFSIZ];
147:
148: int Verbose;
149:
150: void glob_init() {
151: int i;
152:
153: for ( i = 0; i < 51; i++ ) {
154: VR(&oVLIST[i]) = &oVAR[i]; NEXT(&oVLIST[i]) = &oVLIST[i+1];
155: }
156: VR(&oVLIST[i]) = &oVAR[i]; NEXT(&oVLIST[i]) = 0;
157: reallocarray((char **)&GPVS->va,(int *)&GPVS->asize,(int *)&GPVS->n,(int)sizeof(struct oPV));
158: reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));
159: CPVS = GPVS;
160: MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),0);
161: OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0;
162: OID(F_FALSE)=O_F; FOP(F_FALSE)=AL_FALSE; F_FALSE->arg.dummy = 0;
163: sprintf(asirname,"%s/asir_symtab",asir_libdir);
164: }
165:
166: void input_init(fp,name)
167: FILE *fp;
168: char *name;
169: {
170: asir_infile = (IN)CALLOC(sizeof(struct oIN),1);
171: asir_infile->name = name; asir_infile->fp = fp;
172: asir_infile->ln = 1; NEXT(asir_infile) = 0;
173: }
174:
175: void notdef(vl,a,b,c)
176: VL vl;
177: Obj a,b,*c;
178: {
179: *c = 0;
180: error("undefined arithmetic operation.");
181: }
182:
183: int kernelmode;
184: int do_asirrc;
185: int do_file;
186: int do_message;
187: int do_fep;
188: int no_prompt;
189: int read_exec_file;
190: static int buserr_sav;
191: static char asir_history[BUFSIZ];
192:
193: extern int mpi_myid;
194:
1.5 noro 195: #if !defined(VISUAL_LIB)
196: void ExitAsir() {
197: exit(0);
198: }
199: #endif
200:
1.1 noro 201: /*
202: * status = 1 abnormal termination (error() etc.)
203: * status = 2 normal termination (end(), quit() etc.)
204: */
205:
206: void asir_terminate(status)
207: int status;
208: {
209: if ( read_exec_file ) {
210: read_exec_file = 0; longjmp(env,status);
211: } else {
212: tty_reset();
213: #if MPI
214: if ( !mpi_myid )
215: close_allconnections();
216: mpi_finalize();
217: #else
218: close_allconnections();
219: #endif
220: if ( kernelmode )
221: fputc(0xff,asir_out);
222: if ( asir_out )
223: fflush(asir_out);
1.13 saito 224: #if FEP
225: if ( do_fep ) {
226: stifle_history(MAXHIST);
227: write_history(asir_history);
228: }
229: #endif
1.1 noro 230: ExitAsir();
231: }
232: }
233:
234: void param_init() {
235: unsigned int et = 0xff;
236: extern int paristack;
237: if ( *((char *)&et) )
238: little_endian = 1;
239: else
240: little_endian = 0;
241: }
242:
243: void prompt() {
244: if ( !no_prompt && !do_fep && asir_infile->fp == stdin )
245: fprintf(asir_out,"[%d]%c",APVS->n,kernelmode?0xfe:' ');
246: fflush(asir_out);
247: }
248:
249: void sprompt(ptr)
250: char *ptr;
251: {
252: sprintf(ptr,"[%d]%c",APVS->n,kernelmode?0xfe:' ');
253: }
254:
255: FILE *in_fp;
256:
257: void process_args(ac,av)
258: int ac;
259: char **av;
260: {
261: do_asirrc = 1;
262: #if !MPI
263: do_message = 1;
264: #endif
265: while ( ac > 0 ) {
266: if ( !strcmp(*av,"-heap") && (ac >= 2) ) {
267: void GC_expand_hp(int);
268:
269: GC_expand_hp(atoi(*(av+1))); av += 2; ac -= 2;
270: } else if ( !strcmp(*av,"-adj") && (ac >= 2) ) {
271: char *slash;
272:
273: slash = strrchr(*(av+1),'/');
274: if ( slash ) {
275: *slash = 0;
276: GC_free_space_numerator = atoi(slash+1);
277: }
278: GC_free_space_divisor = atoi(*(av+1));
279: av += 2; ac -= 2;
280: } else if ( !strcmp(*av,"-cpp") && (ac >= 2) ) {
281: strcpy(cppname,*(av+1)); av += 2; ac -= 2;
282: } else if ( !strcmp(*av,"-f") && (ac >= 2) ) {
283: in_fp = fopen(*(av+1),"r");
284: if ( !in_fp ) {
285: fprintf(stderr,"%s does not exist!",*(av+1));
286: asir_terminate(1);
287: }
288: do_file = 1;
289: av += 2; ac -= 2;
290: } else if ( !strcmp(*av,"-kernel") ) {
291: kernelmode = 1; av++; ac--;
292: } else if ( !strcmp(*av,"-norc") ) {
293: do_asirrc = 0; av++; ac--;
294: } else if ( !strcmp(*av,"-nomessage") ) {
295: do_message = 0; av++; ac--;
296: } else if ( !strcmp(*av,"-terse") ) {
297: no_prompt = 0; av++; ac--;
1.11 noro 298: } else if ( !strcmp(*av,"-rootdir") && (ac >= 2) ) {
299: set_rootdir(*(av+1)); av += 2; ac -= 2;
1.1 noro 300: } else if ( !strcmp(*av,"-maxheap") && (ac >= 2) ) {
301: void GC_set_max_heap_size(int);
302:
303: GC_set_max_heap_size(atoi(*(av+1))); av += 2; ac -= 2;
304: #if !defined(VISUAL)
305: } else if ( !strcmp(*av,"-display") && (ac >= 2) ) {
306: strcpy(displayname,*(av+1)); av += 2; ac -= 2;
307: #endif
1.13 saito 308: #if FEP
309: } else if ( !strcmp(*av,"-fep") ) {
310: do_fep = 1; av++; ac--;
311: #endif
1.1 noro 312: #if PARI
313: } else if ( !strcmp(*av,"-paristack") ) {
314: extern int paristack;
315:
316: paristack = atoi(*(av+1)); av += 2; ac -= 2;
317: #endif
318: } else {
319: fprintf(stderr,"%s : unknown option.\n",*av);
320: asir_terminate(1);
321: }
322: }
1.13 saito 323: #if FEP
324: if ( do_fep ) {
325: char *home;
326: home = (char *)getenv("HOME");
327: if (!home)
328: home = ".";
329: sprintf (asir_history, "%s/.asir_history",home);
330: read_history(asir_history);
331: using_history();
332: }
333: #endif
1.1 noro 334: }
335:
336: #include <signal.h>
337:
338: void sig_init() {
339: #if !defined(VISUAL)
340: signal(SIGINT,int_handler);
341: #else
342: register_ctrlc_handler();
343: #endif
344: signal(SIGSEGV,segv_handler);
345:
346: #if defined SIGFPE
347: signal(SIGFPE,fpe_handler);
348: #endif
349:
350: #if defined SIGPIPE
351: signal(SIGPIPE,pipe_handler);
352: #endif
353:
354: #if defined SIGILL
355: signal(SIGILL,ill_handler);
356: #endif
357:
358: #if !defined(VISUAL)
359: signal(SIGBUS,bus_handler);
360: #endif
361: }
362:
363: static void (*old_int)(int);
364:
365: void asir_save_handler() {
366: old_int = signal(SIGINT,SIG_IGN);
367: signal(SIGINT,old_int);
368: }
369:
370: void asir_set_handler() {
371: signal(SIGINT,int_handler);
372: }
373:
374: void asir_reset_handler() {
375: signal(SIGINT,old_int);
376: }
377:
378: void resetenv(s)
379: char *s;
380: {
381: extern FILE *outfile;
382:
383: fprintf(stderr,"%s\n",s);
384: while ( NEXT(asir_infile) )
385: closecurrentinput();
386: resetpvs();
387: #if !defined(VISUAL)
388: if ( do_server_in_X11 )
389: #endif
390: show_debug_window(0);
391: #if defined(VISUAL_LIB)
392: w_noflush_stderr(0);
393: #endif
394: asir_out = stdout;
395: #if PARI
396: pari_outfile = stdout;
397: #endif
398: /* restore states */
399: reset_engine();
400: reset_io();
1.16 noro 401: #if !defined(VISUAL)
1.15 noro 402: reset_timer();
1.16 noro 403: #endif
1.1 noro 404: longjmp(env,1);
405: }
406:
407: void fatal(n)
408: int n;
409: {
410: resetenv("return to toplevel");
411: }
412:
413: FUNC registered_handler;
414: extern int ox_int_received, critical_when_signal;
415:
416: void int_handler(sig)
417: int sig;
418: {
419: extern NODE PVSS;
420:
421: if ( do_file ) {
422: ExitAsir();
423: }
424: if ( critical_when_signal ) {
425: ox_int_received = 1;
426: return;
427: }
1.12 noro 428: #if defined(VISUAL)
1.19 ! noro 429: suspend_timer();
1.1 noro 430: #endif
431: signal(SIGINT,SIG_IGN);
1.3 noro 432: #if !defined(VISUAL)
433: if ( do_server_in_X11 ) {
434: debug(PVSS?((VS)BDY(PVSS))->usrf->f.usrf->body:0);
435: restore_handler();
436: return;
437: }
1.1 noro 438: #endif
439: #if defined(linux)
440: #if 1
441: while ( stdin->_IO_read_ptr < stdin->_IO_read_end )
442: #else
443: while ( stdin->_gptr < stdin->_egptr )
444: #endif
445: getchar();
446: #endif
447: while ( 1 ) {
448: char buf[BUFSIZ];
449: char c;
450:
451: fprintf(stderr,"interrupt ?(q/t/c/d/u/w/?) "); fflush(stderr);
452: if ( kernelmode )
453: fputc('\0',stderr);
454: buf[0] = '\n';
455: while ( buf[0] == '\n' )
456: fgets(buf,BUFSIZ,stdin);
457: switch ( c = buf[0] ) {
458: case 'q':
459: while ( 1 ) {
460: fprintf(stderr,"Abort this session? (y or n) "); fflush(stderr);
461: fgets(buf,BUFSIZ,stdin);
462: if ( !strncmp(buf,"y",1) ) {
463: read_exec_file = 0;
464: fprintf(stderr,"Bye\n"); asir_terminate(1);
465: } else if ( !strncmp(buf,"n",1) ) {
466: restore_handler();
467: return;
468: }
469: }
470: break;
471: case 't':
472: case 'u':
473: while ( 1 ) {
474: fprintf(stderr,"Abort this computation? (y or n) "); fflush(stderr);
475: fgets(buf,BUFSIZ,stdin);
476: if ( !strncmp(buf,"y",1) )
477: break;
478: else if ( !strncmp(buf,"n",1) ) {
479: restore_handler();
480: return;
481: }
482: }
483: if ( debug_mode )
484: debug_mode = 0;
485: if ( kernelmode )
486: fputc('\0',stderr);
487: restore_handler();
488: if ( c == 'u' ) {
489: if ( registered_handler ) {
490: fprintf(stderr,
491: "Calling the registered exception handler...");
492: bevalf(registered_handler,0);
493: fprintf(stderr, "done.\n");
494: }
495: }
496: if ( read_exec_file ) {
497: read_exec_file = 0;
498: resetenv("initialization aborted; return to toplevel");
499: } else
500: resetenv("return to toplevel");
501: break;
502: case 'd':
503: #if 0
504: nextbp = 1; nextbplevel = -1;
505: #endif
506: debug(PVSS?((VS)BDY(PVSS))->usrf->f.usrf->body:0);
507: restore_handler();
508: return;
509: case 'c':
510: if ( kernelmode )
511: fputc('\0',stderr);
512: restore_handler();
513: return; break;
514: case 'w':
515: showpos(); break;
516: case '?':
517: fprintf(stderr, "q:quit t:toplevel c:continue d:debug u:call registered handler w:where\n");
518: break;
519: default:
520: break;
521: }
522: }
523: }
524:
525: void restore_handler() {
1.12 noro 526: #if defined(VISUAL)
1.19 ! noro 527: resume_timer();
1.1 noro 528: #endif
1.19 ! noro 529: #if defined(SIGINT)
1.1 noro 530: signal(SIGINT,int_handler);
531: #endif
532: }
533:
534: void segv_handler(sig)
535: int sig;
536: {
1.19 ! noro 537: #if defined(SIGSEGV)
1.1 noro 538: signal(SIGSEGV,segv_handler);
1.19 ! noro 539: error("internal error (SEGV)");
1.1 noro 540: #endif
541: }
542:
543: void ill_handler(sig)
544: int sig;
545: {
1.19 ! noro 546: #if defined(SIGILL)
1.1 noro 547: signal(SIGILL,ill_handler);
1.19 ! noro 548: error("illegal instruction (ILL)");
1.1 noro 549: #endif
550: }
551:
552: void alrm_handler(sig)
553: int sig;
554: {
555: fprintf(stderr,"interval timer expired (VTALRM)\n");
556: longjmp(timer_env,1);
557: }
558:
559: void bus_handler(sig)
560: int sig;
561: {
562: #if defined(SIGBUS)
563: signal(SIGBUS,bus_handler);
564: error("internal error (BUS ERROR)");
565: #endif
566: }
567:
568: void fpe_handler(sig)
569: int sig;
570: {
1.19 ! noro 571: #if defined(SIGFPE)
1.1 noro 572: signal(SIGFPE,fpe_handler);
1.19 ! noro 573: error("internal error (FPE)");
1.1 noro 574: #endif
575: }
576:
577: void pipe_handler(sig)
578: int sig;
579: {
580: #if defined(SIGPIPE)
581: signal(SIGPIPE,pipe_handler);
582: error("internal error (BROKEN PIPE)");
583: #endif
584: }
585:
586: void resize_buffer()
587: {
588: }
589:
590: void tty_init() {
591: }
592:
593: void tty_reset() {
594: }
595:
596: extern int evalstatline;
597:
598: void set_lasterror(s)
599: char *s;
600: {
601: strncpy(LastError,s,BUFSIZ);
602: LastError[BUFSIZ-1] = 0;
603: }
604:
605: SNODE error_snode;
606:
607: void error(s)
608: char *s;
609: {
610: SNODE *snp;
611:
1.16 noro 612: #if !defined(VISUAL)
1.15 noro 613: if ( timer_is_set )
614: alrm_handler(SIGVTALRM);
1.16 noro 615: #endif
1.1 noro 616: fprintf(stderr,"%s\n",s);
617: set_lasterror(s);
618: if ( CPVS != GPVS ) {
1.7 noro 619: if ( CPVS->usrf && CPVS->usrf && CPVS->usrf->f.usrf )
620: searchsn(&BDY(CPVS->usrf->f.usrf),evalstatline,&snp);
1.6 noro 621: if ( snp )
622: error_snode = *snp;
623: else
624: error_snode = 0;
1.1 noro 625: } else
626: error_snode = 0;
627: if ( do_file ) {
628: char errbuf[BUFSIZ*5]; /* sufficient to store stack information ? */
629:
630: sprintf(errbuf,"%s\n",s);
631: showpos_to_string(errbuf+strlen(errbuf));
632: set_lasterror(errbuf);
633: ExitAsir();
634: }
635: if ( debug_mode )
636: longjmp(debug_env,1);
637: if ( CPVS != GPVS )
638: if ( do_server_in_X11 || isatty(0) )
639: bp(error_snode);
640: if ( read_exec_file )
641: read_exec_file = 0;
642: resetenv("return to toplevel");
643: }
644:
645: #if !defined(VISUAL)
646: #include <sys/time.h>
647:
648: void set_timer(interval)
649: int interval;
650: {
651: struct itimerval it;
652:
653: it.it_interval.tv_sec = interval;
654: it.it_interval.tv_usec = 0;
655: it.it_value.tv_sec = interval;
656: it.it_value.tv_usec = 0;
657: setitimer(ITIMER_VIRTUAL,&it,0);
658: signal(SIGVTALRM,alrm_handler);
1.15 noro 659: timer_is_set = 1;
1.1 noro 660: }
661:
662: void reset_timer()
663: {
664: struct itimerval it;
665:
666: it.it_interval.tv_sec = 0;
667: it.it_interval.tv_usec = 0;
668: it.it_value.tv_sec = 0;
669: it.it_value.tv_usec = 0;
670: setitimer(ITIMER_VIRTUAL,&it,0);
671: signal(SIGVTALRM,SIG_IGN);
1.15 noro 672: timer_is_set = 0;
1.1 noro 673: }
674: #endif
675:
676: unsigned int get_asir_version();
1.14 noro 677: char *get_asir_distribution();
1.1 noro 678:
679: void copyright() {
1.17 noro 680: #if defined(INTERVAL)
681: printf("This is Risa/Asir + Interval Arithmetic, Version %d (%s Distribution).\n",
682: get_asir_version(), get_asir_distribution());
683: #else
1.14 noro 684: printf("This is Risa/Asir, Version %d (%s Distribution).\n",
685: get_asir_version(), get_asir_distribution());
1.17 noro 686: #endif
1.14 noro 687: printf("Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.\n");
688: printf("Copyright 2000,2001, Risa/Asir committers, http://www.openxm.org/.\n");
689: printf("GC 5.3, copyright 1999, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n");
690: printf("PARI 2.0.17(beta), copyright (C) 1989-1999,\n");
691: printf(" C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.\n");
1.1 noro 692: }
1.14 noro 693:
1.5 noro 694:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>