Changeset 2272c33 in git


Ignore:
Timestamp:
Dec 3, 1999, 12:20:15 PM (24 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
119b42669f61fbdc46ad811506b6378c287583fb
Parents:
caa8e6acf436c3f1afc45aa776a9230ee6926ea0
Message:
* abort for Emacs implemented
* env variables for ESingular prefixed with ESINGULAR


git-svn-id: file:///usr/local/Singular/svn/trunk@3955 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    rcaa8e6 r2272c33  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.27 1999-11-15 17:19:52 obachman Exp $ */
     4/* $Id: cntrlc.cc,v 1.28 1999-12-03 11:20:13 obachman Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    1919#include "cntrlc.h"
    2020#include "polys.h"
     21#include "feOpt.h"
    2122#ifdef PAGE_TEST
    2223#include "page.h"
     
    342343  {
    343344    int cnt=0;
    344     fprintf(stderr,"\n(last cmd:%d: `%s` in line\n>>%s<<)",
    345       iiOp,Tok2Cmdname(iiOp),my_yylinebuf);
    346     fputs("\nabort command(a), continue(c) or quit Singular(q) ?",stderr);fflush(stderr);
    347     switch(fgetc(stdin))
     345    int c;
     346    fprintf(stderr,"// ** Interrupt at cmd:`%s` in line:'%s'\n",
     347      Tok2Cmdname(iiOp),my_yylinebuf);
     348    if (feGetOptValue(FE_OPT_EMACS) == NULL)
     349    {
     350      fputs("abort command(a), continue(c) or quit Singular(q) ?",stderr);fflush(stderr);
     351      c = fgetc(stdin);
     352    }
     353    else
     354    {
     355      c = 'a';
     356    }
     357   
     358    switch(c)
    348359    {
    349360#if defined(MONOM_COUNT) || defined(DIV_COUNT)
     
    379390                siCntrlc++;
    380391      case 'c':
    381                 fgetc(stdin);
     392                if (feGetOptValue(FE_OPT_EMACS) == NULL) fgetc(stdin);
    382393                signal(SIGINT ,(si_hdl_typ)sigint_handler);
    383394                return;
  • Singular/extra.cc

    rcaa8e6 r2272c33  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.124 1999-12-01 13:22:51 Singular Exp $ */
     4/* $Id: extra.cc,v 1.125 1999-12-03 11:20:14 obachman Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    482482     res->rtyp=STRING_CMD;
    483483     res->data=(void *)mstrdup(
    484        "Olaf Bachmann, Hubert Grassmann, Kai Krueger, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Thomas Siebert, Ruediger Stobbe, Tim Wichmann");
     484       "Olaf Bachmann, Hubert Grassmann, Kai Krueger, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
    485485     return FALSE;
    486486   }
  • Singular/feOpt.cc

    rcaa8e6 r2272c33  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feOpt.cc,v 1.7 1999-11-15 17:19:56 obachman Exp $ */
     4/* $Id: feOpt.cc,v 1.8 1999-12-03 11:20:14 obachman Exp $ */
    55/*
    66* ABSTRACT: Implementation of option buisness
     
    247247  }
    248248  return FE_OPT_UNDEF;
     249}
     250
     251void* feGetOptValue(feOptIndex opt)
     252{
     253  return feOptSpec[(int)opt].value;
    249254}
    250255
  • Singular/feOpt.h

    rcaa8e6 r2272c33  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: feOpt.h,v 1.3 1999-11-15 17:19:56 obachman Exp $ */
     6/* $Id: feOpt.h,v 1.4 1999-12-03 11:20:15 obachman Exp $ */
    77/*
    88* ABSTRACT: Declarations for working with Options
     
    1515#define LONG_OPTION_RETURN 13
    1616
    17 // specifies format of options
     17/* specifies format of options */
    1818extern struct fe_option feOptSpec[];
    1919
    2020#ifndef GENERATE_OPTION_INDEX
    2121
    22 // provides feOptIndex enum type for fast accesses to feOptSpec
     22/* provides feOptIndex enum type for fast accesses to feOptSpec */
    2323#if ! defined(GENTABLE) && ! defined(GENERATE_DEPEND)
    2424#ifdef ESINGULAR
     
    3030typedef enum {FE_OPT_UNDEF}  feOptIndex;
    3131#endif
     32
     33#ifdef __cplusplus
     34extern "C" {
     35#endif
     36
     37void* feGetOptValue(feOptIndex opt);
     38 
     39
     40#ifdef __cplusplus
     41}
    3242
    3343inline void* feOptValue(feOptIndex opt)
     
    7282void fePrintOptValues();
    7383
    74 #endif // ! GENERATE_OPTION_INDEX
     84#endif /* __cplusplus */
    7585
    76 #endif //  FEOPTS_H
     86#endif /* ! GENERATE_OPTION_INDEX */
     87
     88#endif /*  FEOPTS_H */
  • Singular/feResource.cc

    rcaa8e6 r2272c33  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feResource.cc,v 1.16 1999-11-15 17:19:57 obachman Exp $ */
     4/* $Id: feResource.cc,v 1.17 1999-12-03 11:20:15 obachman Exp $ */
    55/*
    66* ABSTRACT: management of resources
     
    7575  {"HtmlDir",   'h',    feResDir,   "SINGULAR_HTML_DIR",    "%r/html",              ""},
    7676  {"ManualUrl", 'u',    feResUrl,   "SINGULAR_URL",         "http://www.mathematik.uni-kl.de/~zca/Singular/Manual/"S_VERSION1,    ""},
    77   {"EmacsDir",  'e',    feResDir,   "SINGULAR_EMACS_DIR",   "%r/emacs",             ""},
    7877#if !defined(macintosh)
    7978  {"netscape",  'N',    feResBinary,"NETSCAPE",             "%b/netscape",          ""},
     
    8584
    8685#ifdef ESINGULAR
    87   {"emacs",    'E',    feResBinary, "EMACS",               "%b/emacs",              ""},
    88   {"SingularEmacs",'M',feResBinary, "SINGULAR",             "%b/Singular",           ""},
    89   {"EmacsLoad",'l',    feResFile,   "SINGULAR_EMACS_LOAD",  "%e/.emacs-singular",             ""},
     86  {"emacs",    'E',    feResBinary, "ESINGULAR_EMACS",      "%b/emacs",              ""},
     87  {"SingularEmacs",'M',feResBinary, "ESINGULAR_SINGULAR",             "%b/Singular",           ""},
     88  {"EmacsLoad",'l',    feResFile,   "ESINGULAR_EMACS_LOAD",  "%e/.emacs-singular",             ""},
     89  {"EmacsDir",  'e',    feResDir,   "ESINGULAR_EMACS_DIR",   "%r/emacs",             ""},
     90#else
     91  {"EmacsDir",  'e',    feResDir,   "SINGULAR_EMACS_DIR",   "%r/emacs",             ""},
    9092#endif
    9193  {NULL, 0, feResUndef, NULL, NULL, NULL}, // must be the last record
Note: See TracChangeset for help on using the changeset viewer.