source: git/Singular/misc.cc @ 53ec64

fieker-DuValspielwiese
Last change on this file since 53ec64 was 146c749, checked in by Hans Schönemann <hannes@…>, 15 years ago
*hannes: ratGB in version string git-svn-id: file:///usr/local/Singular/svn/trunk@11428 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 17.9 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/*
5* ABSTRACT:
6*/
7
8#include <string.h>
9#include <unistd.h>
10#include <stdio.h>
11#include <stddef.h>
12#include <stdlib.h>
13#include <time.h>
14
15#include "mod2.h"
16#include <mylimits.h>
17#include "omalloc.h"
18#include "structs.h"
19#include "tok.h"
20#include "febase.h"
21#include "cntrlc.h"
22#include "page.h"
23#include "ipid.h"
24#include "ipshell.h"
25#include "kstd1.h"
26#include "subexpr.h"
27#include "timer.h"
28#include "intvec.h"
29#include "ring.h"
30#include "omSingularConfig.h"
31#include "p_Procs.h"
32/* Needed for debug Version of p_SetRingOfLeftv, Oliver */
33#ifdef PDEBUG
34#include "p_polys.h"
35#endif
36#include "version.h"
37
38#include "static.h"
39#ifdef HAVE_STATIC
40#undef HAVE_DYN_RL
41#endif
42
43#define SI_DONT_HAVE_GLOBAL_VARS
44
45//#ifdef HAVE_LIBPARSER
46//#  include "libparse.h"
47//#endif /* HAVE_LIBPARSER */
48
49#ifdef HAVE_FACTORY
50#include <factory.h>
51#endif
52
53/* version strings */
54#ifdef HAVE_LIBFAC_P
55  extern const char * libfac_version;
56  extern const char * libfac_date;
57#endif
58#include <si_gmp.h>
59#ifdef HAVE_MPSR
60#include <MP_Config.h>
61#endif
62
63/*2
64* initialize components of Singular
65*/
66int inits(void)
67{
68  int t;
69/*4 signal handler:*/
70  init_signals();
71/*4 randomize: */
72  t=initTimer();
73  /*t=(int)time(NULL);*/
74  if (t==0) t=1;
75#ifdef HAVE_RTIMER
76  initRTimer();
77#endif
78#ifdef buildin_rand
79  siSeed=t;
80#else
81  srand((unsigned int)t);
82#endif
83#ifdef HAVE_FACTORY
84  factoryseed(t);
85#endif
86/*4 private data of other modules*/
87  memset(&sLastPrinted,0,sizeof(sleftv));
88  sLastPrinted.rtyp=NONE;
89  return t;
90}
91
92/*2
93* the renice routine for very large jobs
94* works only on unix machines,
95* testet on : linux, HP 9.0
96*
97*#include <sys/times.h>
98*#include <sys/resource.h>
99*extern "C" int setpriority(int,int,int);
100*void very_nice()
101*{
102*#ifndef NO_SETPRIORITY
103*  setpriority(PRIO_PROCESS,0,19);
104*#endif
105*  sleep(10);
106*}
107*/
108
109void singular_example(char *str)
110{
111  assume(str!=NULL);
112  char *s=str;
113  while (*s==' ') s++;
114  char *ss=s;
115  while (*ss!='\0') ss++;
116  while (*ss<=' ')
117  {
118    *ss='\0';
119    ss--;
120  }
121  idhdl h=IDROOT->get(s,myynest);
122  if ((h!=NULL) && (IDTYP(h)==PROC_CMD))
123  {
124    char *lib=iiGetLibName(IDPROC(h));
125    if((lib!=NULL)&&(*lib!='\0'))
126    {
127      Print("// proc %s from lib %s\n",s,lib);
128      s=iiGetLibProcBuffer(IDPROC(h), 2);
129      if (s!=NULL)
130      {
131        if (strlen(s)>5)
132        {
133          iiEStart(s,IDPROC(h));
134          return;
135        }
136        else omFree((ADDRESS)s);
137      }
138    }
139  }
140  else
141  {
142    char sing_file[MAXPATHLEN];
143    FILE *fd=NULL;
144    char *res_m=feResource('m', 0);
145    if (res_m!=NULL)
146    {
147      sprintf(sing_file, "%s/%s.sing", res_m, s);
148      fd = feFopen(sing_file, "r");
149    }
150    if (fd != NULL)
151    {
152
153      int old_echo = si_echo;
154      int length, got;
155      char* s;
156
157      fseek(fd, 0, SEEK_END);
158      length = ftell(fd);
159      fseek(fd, 0, SEEK_SET);
160      s = (char*) omAlloc((length+20)*sizeof(char));
161      got = fread(s, sizeof(char), length, fd);
162      fclose(fd);
163      if (got != length)
164      {
165        Werror("Error while reading file %s", sing_file);
166        omFree(s);
167      }
168      else
169      {
170        s[length] = '\0';
171        strcat(s, "\n;return();\n\n");
172        si_echo = 2;
173        iiEStart(s, NULL);
174        si_echo = old_echo;
175      }
176    }
177    else
178    {
179      Werror("no example for %s", str);
180    }
181  }
182}
183
184
185struct soptionStruct
186{
187  const char * name;
188  unsigned   setval;
189  unsigned   resetval;
190};
191
192struct soptionStruct optionStruct[]=
193{
194  {"prot",         Sy_bit(OPT_PROT),           ~Sy_bit(OPT_PROT)   },
195  {"redSB",        Sy_bit(OPT_REDSB),          ~Sy_bit(OPT_REDSB)   },
196  {"notBuckets",   Sy_bit(OPT_NOT_BUCKETS),    ~Sy_bit(OPT_NOT_BUCKETS)   },
197  {"notSugar",     Sy_bit(OPT_NOT_SUGAR),      ~Sy_bit(OPT_NOT_SUGAR)   },
198  {"interrupt",    Sy_bit(OPT_INTERRUPT),      ~Sy_bit(OPT_INTERRUPT)   },
199  {"sugarCrit",    Sy_bit(OPT_SUGARCRIT),      ~Sy_bit(OPT_SUGARCRIT)   },
200  {"teach",     Sy_bit(OPT_DEBUG),          ~Sy_bit(OPT_DEBUG)  },
201  /* 9 return SB in syz, quotient, intersect */
202  {"returnSB",     Sy_bit(OPT_RETURN_SB),      ~Sy_bit(OPT_RETURN_SB)  },
203  {"fastHC",       Sy_bit(OPT_FASTHC),         ~Sy_bit(OPT_FASTHC)  },
204  /* 11-19 sort in L/T */
205  {"keepvars",     Sy_bit(OPT_KEEPVARS),       ~Sy_bit(OPT_KEEPVARS) },
206  {"staircaseBound",Sy_bit(OPT_STAIRCASEBOUND),~Sy_bit(OPT_STAIRCASEBOUND)  },
207  {"multBound",    Sy_bit(OPT_MULTBOUND),      ~Sy_bit(OPT_MULTBOUND)  },
208  {"degBound",     Sy_bit(OPT_DEGBOUND),       ~Sy_bit(OPT_DEGBOUND)  },
209  /* 25 no redTail(p)/redTail(s) */
210  {"redTail",      Sy_bit(OPT_REDTAIL),        ~Sy_bit(OPT_REDTAIL)  },
211  {"redThrough",   Sy_bit(OPT_REDTHROUGH),     ~Sy_bit(OPT_REDTHROUGH)  },
212  {"lazy",         Sy_bit(OPT_OLDSTD),         ~Sy_bit(OPT_OLDSTD)  },
213  {"intStrategy",  Sy_bit(OPT_INTSTRATEGY),    ~Sy_bit(OPT_INTSTRATEGY)  },
214  {"infRedTail",   Sy_bit(OPT_INFREDTAIL),     ~Sy_bit(OPT_INFREDTAIL)  },
215  /* 30: use not regularity for syz */
216  {"notRegularity",Sy_bit(OPT_NOTREGULARITY),  ~Sy_bit(OPT_NOTREGULARITY)  },
217  {"weightM",      Sy_bit(OPT_WEIGHTM),        ~Sy_bit(OPT_WEIGHTM)  },
218/*special for "none" and also end marker for showOption:*/
219  {"ne",           0,                          0 }
220};
221
222struct soptionStruct verboseStruct[]=
223{
224  {"mem",      Sy_bit(V_SHOW_MEM),  ~Sy_bit(V_SHOW_MEM)   },
225  {"yacc",     Sy_bit(V_YACC),      ~Sy_bit(V_YACC)       },
226  {"redefine", Sy_bit(V_REDEFINE),  ~Sy_bit(V_REDEFINE)   },
227  {"reading",  Sy_bit(V_READING),   ~Sy_bit(V_READING)    },
228  {"loadLib",  Sy_bit(V_LOAD_LIB),  ~Sy_bit(V_LOAD_LIB)   },
229  {"debugLib", Sy_bit(V_DEBUG_LIB), ~Sy_bit(V_DEBUG_LIB)  },
230  {"loadProc", Sy_bit(V_LOAD_PROC), ~Sy_bit(V_LOAD_PROC)  },
231  {"defRes",   Sy_bit(V_DEF_RES),   ~Sy_bit(V_DEF_RES)    },
232  {"debugMem", Sy_bit(V_DEBUG_MEM), ~Sy_bit(V_DEBUG_MEM)  },
233  {"usage",    Sy_bit(V_SHOW_USE),  ~Sy_bit(V_SHOW_USE)   },
234  {"Imap",     Sy_bit(V_IMAP),      ~Sy_bit(V_IMAP)       },
235  {"prompt",   Sy_bit(V_PROMPT),    ~Sy_bit(V_PROMPT)     },
236  {"length",   Sy_bit(V_LENGTH),    ~Sy_bit(V_LENGTH)     },
237  {"notWarnSB",Sy_bit(V_NSB),       ~Sy_bit(V_NSB)        },
238  {"contentSB",Sy_bit(V_CONTENTSB), ~Sy_bit(V_CONTENTSB)  },
239  {"cancelunit",Sy_bit(V_CANCELUNIT),~Sy_bit(V_CANCELUNIT)},
240  {"modpsolve",Sy_bit(V_MODPSOLVSB),~Sy_bit(V_MODPSOLVSB)},
241  {"geometricSB",Sy_bit(V_UPTORADICAL),~Sy_bit(V_UPTORADICAL)},
242  {"findMonomials",Sy_bit(V_FINDMONOM),~Sy_bit(V_FINDMONOM)},
243  {"coefStrat",Sy_bit(V_COEFSTRAT),~Sy_bit(V_COEFSTRAT)},
244/*special for "none" and also end marker for showOption:*/
245  {"ne",         0,          0 }
246};
247
248BOOLEAN setOption(leftv res, leftv v)
249{
250  const char *n;
251  do
252  {
253    if (v->Typ()==STRING_CMD)
254    {
255      n=(const char *)v->CopyD(STRING_CMD);
256    }
257    else
258    {
259      if (v->name==NULL)
260        return TRUE;
261      if (v->rtyp==0)
262      {
263        n=v->name;
264        v->name=NULL;
265      }
266      else
267      {
268        n=omStrDup(v->name);
269      }
270    }
271
272    int i;
273
274    if(strcmp(n,"get")==0)
275    {
276      intvec *w=new intvec(2);
277      (*w)[0]=test;
278      (*w)[1]=verbose;
279      res->rtyp=INTVEC_CMD;
280      res->data=(void *)w;
281      goto okay;
282    }
283    if(strcmp(n,"set")==0)
284    {
285      if((v->next!=NULL)
286      &&(v->next->Typ()==INTVEC_CMD))
287      {
288        v=v->next;
289        intvec *w=(intvec*)v->Data();
290        test=(*w)[0];
291        verbose=(*w)[1];
292#if 0
293        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
294        && rField_has_simple_inverse()
295#ifdef HAVE_RINGS
296        && !rField_is_Ring(currRing)
297#endif
298        ) {
299          test &=~Sy_bit(OPT_INTSTRATEGY);
300        }
301#endif
302        goto okay;
303      }
304    }
305    if(strcmp(n,"none")==0)
306    {
307      test=0;
308      verbose=0;
309      goto okay;
310    }
311    for (i=0; (i==0) || (optionStruct[i-1].setval!=0); i++)
312    {
313      if (strcmp(n,optionStruct[i].name)==0)
314      {
315        if (optionStruct[i].setval & validOpts)
316        {
317          test |= optionStruct[i].setval;
318          // optOldStd disables redthrough
319          if (optionStruct[i].setval == Sy_bit(OPT_OLDSTD))
320            test &= ~Sy_bit(OPT_REDTHROUGH);
321        }
322        else
323          Warn("cannot set option");
324#if 0
325        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
326        && rField_has_simple_inverse()
327#ifdef HAVE_RINGS
328        && !rField_is_Ring(currRing)
329#endif
330        ) {
331          test &=~Sy_bit(OPT_INTSTRATEGY);
332        }
333#endif
334        goto okay;
335      }
336      else if ((strncmp(n,"no",2)==0)
337      && (strcmp(n+2,optionStruct[i].name)==0))
338      {
339        if (optionStruct[i].setval & validOpts)
340        {
341          test &= optionStruct[i].resetval;
342        }
343        else
344          Warn("cannot clear option");
345        goto okay;
346      }
347    }
348    for (i=0; (i==0) || (verboseStruct[i-1].setval!=0); i++)
349    {
350      if (strcmp(n,verboseStruct[i].name)==0)
351      {
352        verbose |= verboseStruct[i].setval;
353        #ifdef YYDEBUG
354        #if YYDEBUG
355        if (BVERBOSE(V_YACC)) yydebug=1;
356        else                  yydebug=0;
357        #endif
358        #endif
359        goto okay;
360      }
361      else if ((strncmp(n,"no",2)==0)
362      && (strcmp(n+2,verboseStruct[i].name)==0))
363      {
364        verbose &= verboseStruct[i].resetval;
365        #ifdef YYDEBUG
366        #if YYDEBUG
367        if (BVERBOSE(V_YACC)) yydebug=1;
368        else                  yydebug=0;
369        #endif
370        #endif
371        goto okay;
372      }
373    }
374    Werror("unknown option `%s`",n);
375  okay:
376    if (currRing != NULL)
377      currRing->options = test & TEST_RINGDEP_OPTS;
378    omFree((ADDRESS)n);
379    v=v->next;
380  } while (v!=NULL);
381  #ifdef HAVE_TCL
382    if (tclmode)
383    {
384      BITSET tmp;
385      int i;
386      StringSetS("");
387      if ((test!=0)||(verbose!=0))
388      {
389        tmp=test;
390        if(tmp)
391        {
392          for (i=0; optionStruct[i].setval!=0; i++)
393          {
394            if (optionStruct[i].setval & test)
395            {
396              StringAppend(" %s",optionStruct[i].name);
397              tmp &=optionStruct[i].resetval;
398            }
399          }
400        }
401        tmp=verbose;
402        if (tmp)
403        {
404          for (i=0; verboseStruct[i].setval!=0; i++)
405          {
406            if (verboseStruct[i].setval & tmp)
407            {
408              StringAppend(" %s",verboseStruct[i].name);
409              tmp &=verboseStruct[i].resetval;
410            }
411          }
412        }
413        PrintTCLS('O',StringAppendS(""));
414        StringSetS("");
415      }
416      else
417      {
418        PrintTCLS('O'," ");
419      }
420    }
421  #endif
422    // set global variable to show memory usage
423    if (BVERBOSE(V_SHOW_MEM)) om_sing_opt_show_mem = 1;
424    else om_sing_opt_show_mem = 0;
425  return FALSE;
426}
427
428char * showOption()
429{
430  int i;
431  BITSET tmp;
432
433  StringSetS("//options:");
434  if ((test!=0)||(verbose!=0))
435  {
436    tmp=test;
437    if(tmp)
438    {
439      for (i=0; optionStruct[i].setval!=0; i++)
440      {
441        if (optionStruct[i].setval & test)
442        {
443          StringAppend(" %s",optionStruct[i].name);
444          tmp &=optionStruct[i].resetval;
445        }
446      }
447      for (i=0; i<32; i++)
448      {
449        if (tmp & Sy_bit(i)) StringAppend(" %d",i);
450      }
451    }
452    tmp=verbose;
453    if (tmp)
454    {
455      for (i=0; verboseStruct[i].setval!=0; i++)
456      {
457        if (verboseStruct[i].setval & tmp)
458        {
459          StringAppend(" %s",verboseStruct[i].name);
460          tmp &=verboseStruct[i].resetval;
461        }
462      }
463      for (i=1; i<32; i++)
464      {
465        if (tmp & Sy_bit(i)) StringAppend(" %d",i+32);
466      }
467    }
468    return omStrDup(StringAppendS(""));
469  }
470  else
471    return omStrDup(StringAppendS(" none"));
472}
473
474char * versionString()
475{
476  char* str = StringSetS("");
477  StringAppend("Singular for %s version %s (%d-%lu)  %s\nwith\n",
478               S_UNAME, S_VERSION1, SINGULAR_VERSION,
479               feVersionId,singular_date);
480  StringAppendS("\t");
481#ifdef HAVE_FACTORY
482              StringAppend("factory(%s),", factoryVersion);
483#endif
484#ifdef HAVE_LIBFAC_P
485              StringAppend("libfac(%s,%s),\n\t",libfac_version,libfac_date);
486#endif
487#if defined (__GNU_MP_VERSION) && defined (__GNU_MP_VERSION_MINOR)
488              StringAppend("GMP(%d.%d),",__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR);
489#else
490              StringAppendS("GMP(1.3),");
491#endif
492#ifdef HAVE_NTL
493#include "NTL/version.h"
494              StringAppend("NTL(%s),",NTL_VERSION);
495#endif
496#ifdef HAVE_MPSR
497              StringAppend("MP(%s),",MP_VERSION);
498#endif
499#if SIZEOF_VOIDP == 8
500              StringAppendS("64bit,");
501#else
502              StringAppendS("32bit,");
503#endif
504#if defined(HAVE_DYN_RL)
505              if (fe_fgets_stdin==fe_fgets_dummy)
506                StringAppendS("no input,");
507              else if (fe_fgets_stdin==fe_fgets)
508                StringAppendS("fgets,");
509              if (fe_fgets_stdin==fe_fgets_stdin_drl)
510                StringAppendS("dynamic readline,");
511              #ifdef HAVE_FEREAD
512              else if (fe_fgets_stdin==fe_fgets_stdin_emu)
513                StringAppendS("emulated readline,");
514              #endif
515              else
516                StringAppendS("unknown fgets method,");
517#else
518  #if defined(HAVE_READLINE) && !defined(FEREAD)
519              StringAppendS("static readline,");
520  #else
521    #ifdef HAVE_FEREAD
522              StringAppendS("emulated readline,");
523    #else
524              StringAppendS("fgets,");
525    #endif
526  #endif
527#endif
528#ifdef HAVE_PLURAL
529              StringAppendS("Plural,");
530#endif
531#ifdef HAVE_DBM
532              StringAppendS("DBM,\n\t");
533#else
534              StringAppendS("\n\t");
535#endif
536#ifdef HAVE_NS
537              StringAppendS("namespaces,");
538#endif
539#ifdef HAVE_DYNAMIC_LOADING
540              StringAppendS("dynamic modules,");
541#endif
542              if (p_procs_dynamic) StringAppendS("dynamic p_Procs,");
543#ifdef TEST
544              StringAppendS("TESTs,");
545#endif
546#if YYDEBUG
547              StringAppendS("YYDEBUG=1,");
548#endif
549#ifdef HAVE_ASSUME
550             StringAppendS("ASSUME,");
551#endif
552#ifdef MDEBUG
553              StringAppend("MDEBUG=%d,",MDEBUG);
554#endif
555#ifdef OM_CHECK
556              StringAppend("OM_CHECK=%d,",OM_CHECK);
557#endif
558#ifdef OM_TRACK
559              StringAppend("OM_TRACK=%d,",OM_TRACK);
560#endif
561#ifdef OM_NDEBUG
562              StringAppendS("OM_NDEBUG,");
563#endif
564#ifdef PDEBUG
565              StringAppendS("PDEBUG,");
566#endif
567#ifdef KDEBUG
568              StringAppendS("KDEBUG,");
569#endif
570#ifndef __OPTIMIZE__
571              StringAppendS("-g,");
572#endif
573#ifdef HAVE_EIGENVAL
574              StringAppendS("eigenvalues,");
575#endif
576#ifdef HAVE_GMS
577              StringAppendS("Gauss-Manin system,");
578#endif
579#ifdef HAVE_RATGRING
580              StringAppendS("ratGB,");
581#endif
582              StringAppend("random=%d\n",siRandomStart);
583              StringAppend("\tCC=%s,\n\tCXX=%s"
584#ifdef __GNUC__
585              "(" __VERSION__ ")"
586#endif
587              "\n",CC,CXX);
588              feStringAppendResources(0);
589              feStringAppendBrowsers(0);
590              StringAppendS("\n");
591              return str;
592}
593
594#ifdef PDEBUG
595#if (OM_TRACK > 2) && defined(OM_TRACK_CUSTOM)
596void p_SetRingOfLeftv(leftv l, ring r)
597{
598  switch(l->rtyp)
599  {
600    case POLY_CMD:
601    case VECTOR_CMD:
602    {
603      poly p=(poly)l->data;
604      while(p!=NULL) { p_SetRingOfLm(p,r); pIter(p); }
605      break;
606    }
607    case IDEAL_CMD:
608    case MODUL_CMD:
609    case MATRIX_CMD:
610    {
611      ideal I=(ideal)l->data;
612      int i;
613      for(i=IDELEMS(I)-1;i>=0;i--)
614      {
615        poly p=I->m[i];
616        while(p!=NULL) { p_SetRingOfLm(p,r); pIter(p); }
617      }
618      break;
619    }
620    default:
621     printf("type %d not yet implementd in p_SetRingOfLeftv\n",l->rtyp);
622     break;
623  }
624}
625#endif
626#endif
627
628#ifdef HAVE_NS
629void listall(int showproc)
630{
631      idhdl hh=basePack->idroot;
632      PrintS("====== Top ==============\n");
633      while (hh!=NULL)
634      {
635        if (showproc || (IDTYP(hh)!=PROC_CMD))
636        {
637          if (IDDATA(hh)==(void *)currRing) PrintS("(R)");
638          else if (IDDATA(hh)==(void *)currPack) PrintS("(P)");
639          else PrintS("   ");
640          Print("::%s, typ %s level %d data %lx",
641                 IDID(hh),Tok2Cmdname(IDTYP(hh)),IDLEV(hh),(long)IDDATA(hh));
642          if ((IDTYP(hh)==RING_CMD)
643          || (IDTYP(hh)==QRING_CMD))
644            Print(" ref: %d\n",IDRING(hh)->ref);
645          else
646            PrintLn();
647        }
648        hh=IDNEXT(hh);
649      }
650      hh=basePack->idroot;
651      while (hh!=NULL)
652      {
653        if (IDDATA(hh)==(void *)basePack)
654          Print("(T)::%s, typ %s level %d data %lx\n",
655          IDID(hh),Tok2Cmdname(IDTYP(hh)),IDLEV(hh),(long)IDDATA(hh));
656        else
657        if ((IDTYP(hh)==RING_CMD)
658        || (IDTYP(hh)==QRING_CMD)
659        || (IDTYP(hh)==PACKAGE_CMD))
660        {
661          Print("====== %s ==============\n",IDID(hh));
662          idhdl h2=IDRING(hh)->idroot;
663          while (h2!=NULL)
664          {
665            if (showproc || (IDTYP(h2)!=PROC_CMD))
666            {
667              if ((IDDATA(h2)==(void *)currRing)
668              && ((IDTYP(h2)==RING_CMD)||(IDTYP(h2)==QRING_CMD)))
669                PrintS("(R)");
670              else if (IDDATA(h2)==(void *)currPack) PrintS("(P)");
671              else PrintS("   ");
672              Print("%s::%s, typ %s level %d data %lx\n",
673              IDID(hh),IDID(h2),Tok2Cmdname(IDTYP(h2)),IDLEV(h2),(long)IDDATA(h2));
674            }
675            h2=IDNEXT(h2);
676          }
677        }
678        hh=IDNEXT(hh);
679      }
680      Print("currRing:%lx, currPack:%lx,basePack:%lx\n",(long)currRing,(long)currPack,(long)basePack);
681      iiCheckPack(currPack);
682}
683#ifndef NDEBUG
684void checkall()
685{
686      idhdl hh=basePack->idroot;
687      while (hh!=NULL)
688      {
689        omCheckAddr(hh);
690        omCheckAddr((ADDRESS)IDID(hh));
691        if (RingDependend(IDTYP(hh))) Print("%s typ %d in Top\n",IDID(hh),IDTYP(hh));
692        hh=IDNEXT(hh);
693      }
694      hh=basePack->idroot;
695      while (hh!=NULL)
696      {
697        if (IDTYP(hh)==PACKAGE_CMD)
698        {
699          idhdl h2=IDPACKAGE(hh)->idroot;
700          while (h2!=NULL)
701          {
702            omCheckAddr(h2);
703            omCheckAddr((ADDRESS)IDID(h2));
704            if (RingDependend(IDTYP(h2))) Print("%s typ %d in %s\n",IDID(h2),IDTYP(h2),IDID(hh));
705            h2=IDNEXT(h2);
706          }
707        }
708        hh=IDNEXT(hh);
709      }
710}
711#endif
712#endif
713
714#include <sys/types.h>
715#include <sys/stat.h>
716#include <unistd.h>
717
718extern "C"
719int singular_fstat(int fd, struct stat *buf)
720{
721  return fstat(fd,buf);
722}
723
Note: See TracBrowser for help on using the repository browser.