Changeset 5ab8e2 in git


Ignore:
Timestamp:
Jun 3, 1998, 8:15:48 PM (26 years ago)
Author:
Wilfred Pohl <pohl@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
f75bebbdfe00b1013d79e040b5f5f26dd37a9cb6
Parents:
2b3ca335dcc9efdc0e13d000f9f2c642e9937a9f
Message:
* introduced SINGULAR_BIN_DIR


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

Legend:

Unmodified
Added
Removed
  • Singular/febase.cc

    r2b3ca33 r5ab8e2  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.cc,v 1.39 1998-06-03 12:58:35 obachman Exp $ */
     4/* $Id: febase.cc,v 1.40 1998-06-03 18:15:48 pohl Exp $ */
    55/*
    66* ABSTRACT: i/o system
     
    243243}
    244244
     245#ifdef WINNT
     246#define INFOPROG "info.exe"
     247#else
     248#define INFOPROG "info"
     249#endif
     250
    245251// we first look into bindir, if nothing found there, we use HAVE_INFO
    246252static char* feGetInfoProgram(const char* bindir)
    247253{
    248 #ifdef HAVE_INFO
    249   char* infoprog = (char* ) AllocL(max(strlen(HAVE_INFO),
    250                                        (bindir != NULL ? strlen(bindir) : 0))
    251                                    + 10);
    252 #else
    253   char* infoprog = (char*) AllocL((bindir != NULL ? strlen(bindir)) + 10);
    254 #endif
    255  
     254  char infoprog[MAXPATHLEN];
    256255  if (bindir != NULL)
    257256  {
    258     sprintf(infoprog, "%s/info", bindir);
    259     if (! access(infoprog, X_OK)) return infoprog;
    260   }
     257    sprintf(infoprog, "%s/%s", bindir, INFOPROG);
     258    if (! access(infoprog, X_OK)) return mstrdup(infoprog);
     259  }
     260
     261  sprintf(infoprog, "%s/%s", SINGULAR_BIN_DIR, INFOPROG);
     262  if (! access(infoprog, X_OK)) return mstrdup(infoprog);
    261263 
    262264#ifdef HAVE_INFO
    263265  sprintf(infoprog, "%s", HAVE_INFO);
    264   if (! access(infoprog, X_OK)) return infoprog;
     266  if (! access(infoprog, X_OK)) return mstrdup(infoprog);
    265267#endif
    266268  // nothing found, let's try "info"
    267269  sprintf(infoprog, "info");
    268   return infoprog;
     270  return mstrdup(infoprog);
    269271}
    270272
  • Singular/mod2.h.in

    r2b3ca33 r5ab8e2  
    109109/* Define the root directory from where Singular searches for libs and info */
    110110#define SINGULAR_ROOT_DIR "/usr/local/"
     111/* Define the directory where binaries are found (resp. put) */
     112#define SINGULAR_BIN_DIR "/usr/local/bin/"
    111113
    112114/*******************************************************************
Note: See TracChangeset for help on using the changeset viewer.