Changeset ad2543e in git


Ignore:
Timestamp:
Jan 30, 2023, 3:26:58 PM (15 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c987db42cd2ec943b97ac5746c99892ceddf909c
Parents:
2234726c50d679d6664181a5c72f75a6fd64a787
Message:
libparse: indep. of singular_ressources
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.am

    r2234726 rad2543e  
    183183libparse_SOURCES = libparse.cc utils.cc utils.h
    184184
    185 libparse_LDADD = ${top_builddir}/resources/libsingular_resources.la
     185#libparse_LDADD = ${top_builddir}/resources/libsingular_resources.la
    186186libparse_LDFLAGS = ${AM_LDFLAGS}
    187187
  • Singular/utils.cc

    r2234726 rad2543e  
    33#ifdef STANDALONE_PARSER
    44
    5 #include "resources/fegetopt.h"
     5#include <unistd.h>
    66#include "Singular/utils.h"
    77#include "Singular/libparse.h"
     
    4444  int c;
    4545
    46   while((c=fe_getopt(argc, argv, "ihdc:sf:"))>=0)
     46  while((c=getopt(argc, argv, "ihdc:sf:"))>=0)
    4747  {
    4848    switch(c)
     
    5050        case 'd':
    5151          lpverbose = 1;
    52           if(isdigit(argv[fe_optind-1][0])) sscanf(optarg, "%d", &lpverbose);
    53           else fe_optind--;
    54           break;
    55         case 'f': lib_file = argv[fe_optind-1];
     52          if(isdigit(argv[optind-1][0])) sscanf(optarg, "%d", &lpverbose);
     53          else optind--;
     54          break;
     55        case 'f': lib_file = argv[optind-1];
    5656          break;
    5757        case 's':
     
    6868          usage(argv[0]);
    6969          break;
    70         case -1 : printf("no such option:%s\n", argv[fe_optind]);
     70        case -1 : printf("no such option:%s\n", argv[optind]);
    7171          usage(argv[0]);
    7272          break;
    73         default: printf("no such option.%x, %c %s\n", c&0xff, c, argv[fe_optind]);
     73        default: printf("no such option.%x, %c %s\n", c&0xff, c, argv[optind]);
    7474          usage(argv[0]);
    7575    }
     
    8787  else
    8888  {
    89     while(argc>fe_optind && yylpin==NULL)
    90     {
    91       yylpin = fopen( argv[fe_optind], "rb" );
     89    while(argc>optind && yylpin==NULL)
     90    {
     91      yylpin = fopen( argv[optind], "rb" );
    9292      if(yylpin!=NULL)
    9393      {
    94         lib_file = argv[fe_optind];
     94        lib_file = argv[optind];
    9595        if (! (texinfo_out || category_out) )
    96           printf("Checking library '%s'\n", argv[fe_optind]);
     96          printf("Checking library '%s'\n", argv[optind]);
    9797        else if (! category_out)
    9898          printf("$library = \"%s\";\n", lib_file);
    9999      }
    100       else fe_optind++;
     100      else optind++;
    101101    }
    102102  }
Note: See TracChangeset for help on using the changeset viewer.