Annotation of OpenXM_contrib2/asir2000/parse/glob.c, Revision 1.20
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.20 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.19 2001/06/15 07:56:06 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
1.20 ! noro 218: #if defined(SIGPIPE)
! 219: signal(SIGPIPE,SIG_IGN);
! 220: #endif
1.1 noro 221: close_allconnections();
222: #endif
223: if ( kernelmode )
224: fputc(0xff,asir_out);
225: if ( asir_out )
226: fflush(asir_out);
1.13 saito 227: #if FEP
228: if ( do_fep ) {
229: stifle_history(MAXHIST);
230: write_history(asir_history);
231: }
232: #endif
1.1 noro 233: ExitAsir();
234: }
235: }
236:
237: void param_init() {
238: unsigned int et = 0xff;
239: extern int paristack;
240: if ( *((char *)&et) )
241: little_endian = 1;
242: else
243: little_endian = 0;
244: }
245:
246: void prompt() {
247: if ( !no_prompt && !do_fep && asir_infile->fp == stdin )
248: fprintf(asir_out,"[%d]%c",APVS->n,kernelmode?0xfe:' ');
249: fflush(asir_out);
250: }
251:
252: void sprompt(ptr)
253: char *ptr;
254: {
255: sprintf(ptr,"[%d]%c",APVS->n,kernelmode?0xfe:' ');
256: }
257:
258: FILE *in_fp;
259:
260: void process_args(ac,av)
261: int ac;
262: char **av;
263: {
264: do_asirrc = 1;
265: #if !MPI
266: do_message = 1;
267: #endif
268: while ( ac > 0 ) {
269: if ( !strcmp(*av,"-heap") && (ac >= 2) ) {
270: void GC_expand_hp(int);
271:
272: GC_expand_hp(atoi(*(av+1))); av += 2; ac -= 2;
273: } else if ( !strcmp(*av,"-adj") && (ac >= 2) ) {
274: char *slash;
275:
276: slash = strrchr(*(av+1),'/');
277: if ( slash ) {
278: *slash = 0;
279: GC_free_space_numerator = atoi(slash+1);
280: }
281: GC_free_space_divisor = atoi(*(av+1));
282: av += 2; ac -= 2;
283: } else if ( !strcmp(*av,"-cpp") && (ac >= 2) ) {
284: strcpy(cppname,*(av+1)); av += 2; ac -= 2;
285: } else if ( !strcmp(*av,"-f") && (ac >= 2) ) {
286: in_fp = fopen(*(av+1),"r");
287: if ( !in_fp ) {
288: fprintf(stderr,"%s does not exist!",*(av+1));
289: asir_terminate(1);
290: }
291: do_file = 1;
292: av += 2; ac -= 2;
293: } else if ( !strcmp(*av,"-kernel") ) {
294: kernelmode = 1; av++; ac--;
295: } else if ( !strcmp(*av,"-norc") ) {
296: do_asirrc = 0; av++; ac--;
297: } else if ( !strcmp(*av,"-nomessage") ) {
298: do_message = 0; av++; ac--;
299: } else if ( !strcmp(*av,"-terse") ) {
300: no_prompt = 0; av++; ac--;
1.11 noro 301: } else if ( !strcmp(*av,"-rootdir") && (ac >= 2) ) {
302: set_rootdir(*(av+1)); av += 2; ac -= 2;
1.1 noro 303: } else if ( !strcmp(*av,"-maxheap") && (ac >= 2) ) {
304: void GC_set_max_heap_size(int);
305:
306: GC_set_max_heap_size(atoi(*(av+1))); av += 2; ac -= 2;
307: #if !defined(VISUAL)
308: } else if ( !strcmp(*av,"-display") && (ac >= 2) ) {
309: strcpy(displayname,*(av+1)); av += 2; ac -= 2;
310: #endif
1.13 saito 311: #if FEP
312: } else if ( !strcmp(*av,"-fep") ) {
313: do_fep = 1; av++; ac--;
314: #endif
1.1 noro 315: #if PARI
316: } else if ( !strcmp(*av,"-paristack") ) {
317: extern int paristack;
318:
319: paristack = atoi(*(av+1)); av += 2; ac -= 2;
320: #endif
321: } else {
322: fprintf(stderr,"%s : unknown option.\n",*av);
323: asir_terminate(1);
324: }
325: }
1.13 saito 326: #if FEP
327: if ( do_fep ) {
328: char *home;
329: home = (char *)getenv("HOME");
330: if (!home)
331: home = ".";
332: sprintf (asir_history, "%s/.asir_history",home);
333: read_history(asir_history);
334: using_history();
335: }
336: #endif
1.1 noro 337: }
338:
339: #include <signal.h>
340:
341: void sig_init() {
342: #if !defined(VISUAL)
343: signal(SIGINT,int_handler);
344: #else
345: register_ctrlc_handler();
346: #endif
347: signal(SIGSEGV,segv_handler);
348:
349: #if defined SIGFPE
350: signal(SIGFPE,fpe_handler);
351: #endif
352:
353: #if defined SIGPIPE
354: signal(SIGPIPE,pipe_handler);
355: #endif
356:
357: #if defined SIGILL
358: signal(SIGILL,ill_handler);
359: #endif
360:
361: #if !defined(VISUAL)
362: signal(SIGBUS,bus_handler);
363: #endif
364: }
365:
366: static void (*old_int)(int);
367:
368: void asir_save_handler() {
369: old_int = signal(SIGINT,SIG_IGN);
370: signal(SIGINT,old_int);
371: }
372:
373: void asir_set_handler() {
374: signal(SIGINT,int_handler);
375: }
376:
377: void asir_reset_handler() {
378: signal(SIGINT,old_int);
379: }
380:
381: void resetenv(s)
382: char *s;
383: {
384: extern FILE *outfile;
385:
386: fprintf(stderr,"%s\n",s);
387: while ( NEXT(asir_infile) )
388: closecurrentinput();
389: resetpvs();
390: #if !defined(VISUAL)
391: if ( do_server_in_X11 )
392: #endif
393: show_debug_window(0);
394: #if defined(VISUAL_LIB)
395: w_noflush_stderr(0);
396: #endif
397: asir_out = stdout;
398: #if PARI
399: pari_outfile = stdout;
400: #endif
401: /* restore states */
402: reset_engine();
403: reset_io();
1.16 noro 404: #if !defined(VISUAL)
1.15 noro 405: reset_timer();
1.16 noro 406: #endif
1.1 noro 407: longjmp(env,1);
408: }
409:
410: void fatal(n)
411: int n;
412: {
413: resetenv("return to toplevel");
414: }
415:
416: FUNC registered_handler;
417: extern int ox_int_received, critical_when_signal;
418:
419: void int_handler(sig)
420: int sig;
421: {
422: extern NODE PVSS;
423:
424: if ( do_file ) {
425: ExitAsir();
426: }
427: if ( critical_when_signal ) {
428: ox_int_received = 1;
429: return;
430: }
1.12 noro 431: #if defined(VISUAL)
1.19 noro 432: suspend_timer();
1.1 noro 433: #endif
434: signal(SIGINT,SIG_IGN);
1.3 noro 435: #if !defined(VISUAL)
436: if ( do_server_in_X11 ) {
437: debug(PVSS?((VS)BDY(PVSS))->usrf->f.usrf->body:0);
438: restore_handler();
439: return;
440: }
1.1 noro 441: #endif
442: #if defined(linux)
443: #if 1
444: while ( stdin->_IO_read_ptr < stdin->_IO_read_end )
445: #else
446: while ( stdin->_gptr < stdin->_egptr )
447: #endif
448: getchar();
449: #endif
450: while ( 1 ) {
451: char buf[BUFSIZ];
452: char c;
453:
454: fprintf(stderr,"interrupt ?(q/t/c/d/u/w/?) "); fflush(stderr);
455: if ( kernelmode )
456: fputc('\0',stderr);
457: buf[0] = '\n';
458: while ( buf[0] == '\n' )
459: fgets(buf,BUFSIZ,stdin);
460: switch ( c = buf[0] ) {
461: case 'q':
462: while ( 1 ) {
463: fprintf(stderr,"Abort this session? (y or n) "); fflush(stderr);
464: fgets(buf,BUFSIZ,stdin);
465: if ( !strncmp(buf,"y",1) ) {
466: read_exec_file = 0;
467: fprintf(stderr,"Bye\n"); asir_terminate(1);
468: } else if ( !strncmp(buf,"n",1) ) {
469: restore_handler();
470: return;
471: }
472: }
473: break;
474: case 't':
475: case 'u':
476: while ( 1 ) {
477: fprintf(stderr,"Abort this computation? (y or n) "); fflush(stderr);
478: fgets(buf,BUFSIZ,stdin);
479: if ( !strncmp(buf,"y",1) )
480: break;
481: else if ( !strncmp(buf,"n",1) ) {
482: restore_handler();
483: return;
484: }
485: }
486: if ( debug_mode )
487: debug_mode = 0;
488: if ( kernelmode )
489: fputc('\0',stderr);
490: restore_handler();
491: if ( c == 'u' ) {
492: if ( registered_handler ) {
493: fprintf(stderr,
494: "Calling the registered exception handler...");
495: bevalf(registered_handler,0);
496: fprintf(stderr, "done.\n");
497: }
498: }
499: if ( read_exec_file ) {
500: read_exec_file = 0;
501: resetenv("initialization aborted; return to toplevel");
502: } else
503: resetenv("return to toplevel");
504: break;
505: case 'd':
506: #if 0
507: nextbp = 1; nextbplevel = -1;
508: #endif
509: debug(PVSS?((VS)BDY(PVSS))->usrf->f.usrf->body:0);
510: restore_handler();
511: return;
512: case 'c':
513: if ( kernelmode )
514: fputc('\0',stderr);
515: restore_handler();
516: return; break;
517: case 'w':
518: showpos(); break;
519: case '?':
520: fprintf(stderr, "q:quit t:toplevel c:continue d:debug u:call registered handler w:where\n");
521: break;
522: default:
523: break;
524: }
525: }
526: }
527:
528: void restore_handler() {
1.12 noro 529: #if defined(VISUAL)
1.19 noro 530: resume_timer();
1.1 noro 531: #endif
1.19 noro 532: #if defined(SIGINT)
1.1 noro 533: signal(SIGINT,int_handler);
534: #endif
535: }
536:
537: void segv_handler(sig)
538: int sig;
539: {
1.19 noro 540: #if defined(SIGSEGV)
1.1 noro 541: signal(SIGSEGV,segv_handler);
1.19 noro 542: error("internal error (SEGV)");
1.1 noro 543: #endif
544: }
545:
546: void ill_handler(sig)
547: int sig;
548: {
1.19 noro 549: #if defined(SIGILL)
1.1 noro 550: signal(SIGILL,ill_handler);
1.19 noro 551: error("illegal instruction (ILL)");
1.1 noro 552: #endif
553: }
554:
555: void alrm_handler(sig)
556: int sig;
557: {
558: fprintf(stderr,"interval timer expired (VTALRM)\n");
559: longjmp(timer_env,1);
560: }
561:
562: void bus_handler(sig)
563: int sig;
564: {
565: #if defined(SIGBUS)
566: signal(SIGBUS,bus_handler);
567: error("internal error (BUS ERROR)");
568: #endif
569: }
570:
571: void fpe_handler(sig)
572: int sig;
573: {
1.19 noro 574: #if defined(SIGFPE)
1.1 noro 575: signal(SIGFPE,fpe_handler);
1.19 noro 576: error("internal error (FPE)");
1.1 noro 577: #endif
578: }
579:
580: void pipe_handler(sig)
581: int sig;
582: {
583: #if defined(SIGPIPE)
584: signal(SIGPIPE,pipe_handler);
1.20 ! noro 585: end_critical();
1.1 noro 586: error("internal error (BROKEN PIPE)");
587: #endif
588: }
589:
590: void resize_buffer()
591: {
592: }
593:
594: void tty_init() {
595: }
596:
597: void tty_reset() {
598: }
599:
600: extern int evalstatline;
601:
602: void set_lasterror(s)
603: char *s;
604: {
605: strncpy(LastError,s,BUFSIZ);
606: LastError[BUFSIZ-1] = 0;
607: }
608:
609: SNODE error_snode;
610:
611: void error(s)
612: char *s;
613: {
614: SNODE *snp;
615:
1.16 noro 616: #if !defined(VISUAL)
1.15 noro 617: if ( timer_is_set )
618: alrm_handler(SIGVTALRM);
1.16 noro 619: #endif
1.1 noro 620: fprintf(stderr,"%s\n",s);
621: set_lasterror(s);
622: if ( CPVS != GPVS ) {
1.7 noro 623: if ( CPVS->usrf && CPVS->usrf && CPVS->usrf->f.usrf )
624: searchsn(&BDY(CPVS->usrf->f.usrf),evalstatline,&snp);
1.6 noro 625: if ( snp )
626: error_snode = *snp;
627: else
628: error_snode = 0;
1.1 noro 629: } else
630: error_snode = 0;
631: if ( do_file ) {
632: char errbuf[BUFSIZ*5]; /* sufficient to store stack information ? */
633:
634: sprintf(errbuf,"%s\n",s);
635: showpos_to_string(errbuf+strlen(errbuf));
636: set_lasterror(errbuf);
637: ExitAsir();
638: }
639: if ( debug_mode )
640: longjmp(debug_env,1);
641: if ( CPVS != GPVS )
642: if ( do_server_in_X11 || isatty(0) )
643: bp(error_snode);
644: if ( read_exec_file )
645: read_exec_file = 0;
646: resetenv("return to toplevel");
647: }
648:
649: #if !defined(VISUAL)
650: #include <sys/time.h>
651:
652: void set_timer(interval)
653: int interval;
654: {
655: struct itimerval it;
656:
657: it.it_interval.tv_sec = interval;
658: it.it_interval.tv_usec = 0;
659: it.it_value.tv_sec = interval;
660: it.it_value.tv_usec = 0;
661: setitimer(ITIMER_VIRTUAL,&it,0);
662: signal(SIGVTALRM,alrm_handler);
1.15 noro 663: timer_is_set = 1;
1.1 noro 664: }
665:
666: void reset_timer()
667: {
668: struct itimerval it;
669:
670: it.it_interval.tv_sec = 0;
671: it.it_interval.tv_usec = 0;
672: it.it_value.tv_sec = 0;
673: it.it_value.tv_usec = 0;
674: setitimer(ITIMER_VIRTUAL,&it,0);
675: signal(SIGVTALRM,SIG_IGN);
1.15 noro 676: timer_is_set = 0;
1.1 noro 677: }
678: #endif
679:
680: unsigned int get_asir_version();
1.14 noro 681: char *get_asir_distribution();
1.1 noro 682:
683: void copyright() {
1.17 noro 684: #if defined(INTERVAL)
685: printf("This is Risa/Asir + Interval Arithmetic, Version %d (%s Distribution).\n",
686: get_asir_version(), get_asir_distribution());
687: #else
1.14 noro 688: printf("This is Risa/Asir, Version %d (%s Distribution).\n",
689: get_asir_version(), get_asir_distribution());
1.17 noro 690: #endif
1.14 noro 691: printf("Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.\n");
692: printf("Copyright 2000,2001, Risa/Asir committers, http://www.openxm.org/.\n");
693: printf("GC 5.3, copyright 1999, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n");
694: printf("PARI 2.0.17(beta), copyright (C) 1989-1999,\n");
695: printf(" C. Batut, K. Belabas, D. Bernardi, H. Cohen and M. Olivier.\n");
1.1 noro 696: }
1.14 noro 697:
1.5 noro 698:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>