Changeset 7272c7 in git for Singular/emacs.cc


Ignore:
Timestamp:
Aug 26, 1999, 11:58:27 AM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
568f65903005ab5f4b482cd1ad5a753f08decb6e
Parents:
ed431c4d123ff261aa5e38a84582a7935bfc786f
Message:
* recognize and delete abbreviations of long options


git-svn-id: file:///usr/local/Singular/svn/trunk@3554 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/emacs.cc

    red431c r7272c7  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: emacs.cc,v 1.3 1999-08-25 20:34:39 wichmann Exp $ */
     4/* $Id: emacs.cc,v 1.4 1999-08-26 09:58:27 obachman Exp $ */
    55/*
    66* ABSTRACT: Esingular main file
     
    4646void fePrintReportBug(char* msg, char* file, int line)
    4747{
    48   WarnS("YOU HAVE FOUND A BUG IN SINGULAR.");
    49   WarnS("Please, email the following output to singular@mathematik.uni-kl.de");
    50   Warn("Bug occured at %s:%d", file, line);
    51   Warn("Message: %s", msg);
     48  WarnS("YOU HAVE FOUND A BUG IN SINGULAR. ");
     49  WarnS("Please, email the following output to singular@mathematik.uni-kl.de ");
     50  Warn("Bug occured at %s:%d ", file, line);
     51  Warn("Message: %s ", msg);
    5252  Warn("Version: " S_UNAME S_VERSION1 " (%d) " __DATE__ __TIME__,
    5353       SINGULAR_VERSION_ID);
     
    9292         
    9393        case '?':
     94        case ':':
    9495          mainUsage(argv[0]);
    9596          exit(1);
     
    116117            no_emacs_call = 1;
    117118          }
    118           break;
    119          
    120         default:
    121           feReportBug("Parsing of Cmd-line options");
    122     }
    123   }
     119          else
     120          {
     121            break;
     122          }
     123          // delete options from option-list
     124          if (optind > 2 && *argv[optind-1] != '-' &&
     125              optarg != NULL && longopts[option_index].has_arg)
     126          {
     127            argv[optind-2] = NULL;
     128          }
     129          argv[optind-1] = NULL;
     130    }
     131  }
    124132 
    125133  // make sure  emacs, singular, emacs_dir, emacs_load are set
     
    183191  for (i=1; i<argc; i++)
    184192  {
    185     if (strstr(argv[i], "--"LON_EMACS) != argv[i] &&
    186         strstr(argv[i], "--"LON_SINGULAR) != argv[i] &&
    187         strstr(argv[i], "--"LON_EMACS_DIR) != argv[i] &&
    188         strstr(argv[i], "--"LON_EMACS_LOAD) != argv[i] &&
    189         strstr(argv[i], "--"LON_NO_EMACS_CALL) != argv[i])
    190     {
    191       length += strlen(argv[i]) + 3;
    192     }
     193    if (argv[i] != NULL) length += strlen(argv[i]) + 3;
    193194  }
    194195 
     
    211212  for (i=1; i<argc; i++)
    212213  {
    213     if (strstr(argv[i], "--"LON_EMACS) != argv[i] &&
    214         strstr(argv[i], "--"LON_SINGULAR) != argv[i] &&
    215         strstr(argv[i], "--"LON_EMACS_DIR) != argv[i] &&
    216         strstr(argv[i], "--"LON_EMACS_LOAD) != argv[i] &&
    217         strstr(argv[i], "--"LON_NO_EMACS_CALL) != argv[i])
     214    if (argv[i] != NULL)
    218215    {
    219216      strcat(syscall, "\"");
Note: See TracChangeset for help on using the changeset viewer.