My Project
Loading...
Searching...
No Matches
feResource.cc File Reference
#include "singular_resourcesconfig.h"
#include "feResource.h"
#include "omFindExec.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <sys/param.h>

Go to the source code of this file.

Macros

#define SINGULAR_DEFAULT_DIR   PREFIX
 
#define MAXRESOURCELEN   5*MAXPATHLEN
 

Functions

static feResourceConfig feGetResourceConfig (const char id)
 
static feResourceConfig feGetResourceConfig (const char *key)
 
static char * feResource (feResourceConfig config, int warn)
 
static char * feResourceDefault (feResourceConfig config)
 
static char * feInitResource (feResourceConfig config, int warn)
 
static char * feGetExpandedExecutable ()
 
static int feVerifyResourceValue (feResourceType type, char *value)
 
static char * feCleanResourceValue (feResourceType type, char *value)
 
static char * feCleanUpFile (char *fname)
 
static char * feCleanUpPath (char *path)
 
static void mystrcpy (char *d, char *s)
 
static char * feSprintf (char *s, const char *fmt, int warn=-1)
 
char * feResource (const char *key, int warn)
 
char * feResource (const char id, int warn)
 
char * feGetResource (const char id, int warn)
 
char * feResourceDefault (const char id)
 
char * feResourceDefault (const char *key)
 
void feInitResources (const char *argv0)
 
void feReInitResources ()
 

Variables

VAR char * feArgv0 = NULL
 
VAR feResourceConfig_s feResourceConfigs []
 

Macro Definition Documentation

◆ MAXRESOURCELEN

#define MAXRESOURCELEN   5*MAXPATHLEN

Definition at line 111 of file feResource.cc.

◆ SINGULAR_DEFAULT_DIR

#define SINGULAR_DEFAULT_DIR   PREFIX

Definition at line 27 of file feResource.cc.

Function Documentation

◆ feCleanResourceValue()

static char * feCleanResourceValue ( feResourceType type,
char * value )
static

Definition at line 441 of file feResource.cc.

442{
443 if (value == NULL || *value == '\0') return value;
444#ifdef RESOURCE_DEBUG
445 printf("Clean value:%s\n", value);
446#endif
447#ifdef __CYGWIN__
448#ifdef RESOURCE_DEBUG
449 printf("Clean WINNT value:%s\n", value);
450#endif
451 if (type == feResBinary)
452 {
453 int l = strlen(value);
454 if (l < 4 || (strcmp(&value[l-4], ".exe") != 0 &&
455 strcmp(&value[l-4], ".EXE") != 0))
456 strcat(value, ".exe");
457 }
458#endif
459 if (type == feResFile || type == feResBinary || type == feResDir)
460 return feCleanUpFile(value);
461 if (type == feResPath)
462 return feCleanUpPath(value);
463 return value;
464}
int l
Definition cfEzgcd.cc:100
static char * feCleanUpFile(char *fname)
static char * feCleanUpPath(char *path)
@ feResBinary
Definition feResource.h:20
@ feResPath
Definition feResource.h:20
@ feResDir
Definition feResource.h:20
@ feResFile
Definition feResource.h:20
#define NULL
Definition omList.c:12

◆ feCleanUpFile()

static char * feCleanUpFile ( char * fname)
static

Definition at line 466 of file feResource.cc.

467{
468 char* fn;
469
470#ifdef RESOURCE_DEBUG
471 printf("feCleanUpFile: entering with =%s=\n", fname);
472#endif
473 // Remove unnecessary .. and //
474 for (fn = fname; *fn != '\0'; fn++)
475 {
476 if (*fn == '/')
477 {
478 if (*(fn+1) == '\0')
479 {
480 if (fname != fn) *fn = '\0';
481 break;
482 }
483 if (*(fn + 1) == '/' && (fname != fn))
484 {
485 mystrcpy(fn, fn+1);
486 fn--;
487 }
488 else if (*(fn+1) == '.')
489 {
490 if (*(fn+2) == '.' && (*(fn + 3) == '/' || *(fn + 3) == '\0'))
491 {
492 #if 0
493 // this does not work: ./../../mmm will be changed to ./../mmm
494 // but we only want to change ././mmm to ./mmm
495 *fn = '\0';
496 s = strrchr(fname, '/');
497 if (s != NULL)
498 {
499 mystrcpy(s+1, fn + (*(fn + 3) != '\0' ? 4 : 3));
500 fn = s-1;
501 }
502 else
503 {
504 *fn = '/';
505 }
506 #endif
507 }
508 else if (*(fn+2) == '/' || *(fn+2) == '\0')
509 {
510 mystrcpy(fn+1, fn+3);
511 fn--;
512 }
513 }
514 }
515 }
516
517#ifdef RESOURCE_DEBUG
518 printf("feCleanUpFile: leaving with =%s=\n", fname);
519#endif
520 return fname;
521}
const CanonicalForm int s
Definition facAbsFact.cc:51
static void mystrcpy(char *d, char *s)

◆ feCleanUpPath()

static char * feCleanUpPath ( char * path)
static

Definition at line 524 of file feResource.cc.

525{
526#ifdef RESOURCE_DEBUG
527 printf("feCleanUpPath: entering with: =%s=\n", path);
528#endif
529 if (path == NULL) return path;
530
531 int n_comps = 1, i, j;
532 char* opath = path;
533 char** path_comps;
534
535 for (; *path != '\0'; path++)
536 {
537 if (*path == fePathSep) n_comps++;
538 else if (*path == ';')
539 {
540 *path = fePathSep;
541 n_comps++;
542 }
543 }
544
545 path_comps = (char**) malloc(n_comps*sizeof(char*));
546 path_comps[0]=opath;
547 path=opath;
548 i = 1;
549
550 if (i < n_comps)
551 {
552 while (1)
553 {
554 if (*path == fePathSep)
555 {
556 *path = '\0';
557 path_comps[i] = path+1;
558 i++;
559 if (i == n_comps) break;
560 }
561 path++;
562 }
563 }
564
565 for (i=0; i<n_comps; i++)
566 path_comps[i] = feCleanUpFile(path_comps[i]);
567#ifdef RESOURCE_DEBUG
568 printf("feCleanUpPath: after CleanUpName: ");
569 for (i=0; i<n_comps; i++)
570 printf("%s:", path_comps[i]);
571 printf("\n");
572#endif
573
574 for (i=0; i<n_comps;)
575 {
576#ifdef RESOURCE_DEBUG
577 if (access(path_comps[i], X_OK | R_OK))
578 printf("feCleanUpPath: remove %d:%s -- can not access\n", i, path_comps[i]);
579#endif
580 if ( ! access(path_comps[i], X_OK | R_OK))
581 {
582 // x- permission is granted -- we assume that it is a dir
583 for (j=0; j<i; j++)
584 {
585 if (strcmp(path_comps[j], path_comps[i]) == 0)
586 {
587 // found a duplicate
588#ifdef RESOURCE_DEBUG
589 printf("feCleanUpPath: remove %d:%s -- equal to %d:%s\n", j, path_comps[j], i, path_comps[i]);
590#endif
591 j = i+1;
592 break;
593 }
594 }
595 if (j == i)
596 {
597 i++;
598 continue;
599 }
600 }
601 // now we can either not access or found a duplicate
602 path_comps[i] = NULL;
603 for (j=i+1; j<n_comps; j++)
604 path_comps[j-1] = path_comps[j];
605 n_comps--;
606 }
607
608
609 // assemble everything again
610 for (path=opath, i=0;i<n_comps-1;i++)
611 {
612 mystrcpy(path, path_comps[i]);
613 path += strlen(path);
614 *path = fePathSep;
615 path++;
616 }
617 if (n_comps)
618 {
619 mystrcpy(path, path_comps[i]);
620 }
621 else
622 {
623 *opath = '\0';
624 }
625 free(path_comps);
626#ifdef RESOURCE_DEBUG
627 printf("feCleanUpPath: leaving with path=%s=\n", opath);
628#endif
629 return opath;
630}
int i
Definition cfEzgcd.cc:132
int j
Definition facHensel.cc:110
const char fePathSep
Definition feResource.h:58
#define free
Definition omAllocFunc.c:14
#define malloc
Definition omAllocFunc.c:12

◆ feGetExpandedExecutable()

static char * feGetExpandedExecutable ( )
static

Definition at line 373 of file feResource.cc.

374{
375 if (feArgv0 == NULL || *feArgv0 == '\0')
376 {
377 if (feArgv0 == NULL)
378 printf("Bug >>feArgv0 == NULL<< at %s:%d\n",__FILE__,__LINE__);
379 else
380 printf("Bug >>feArgv0 == ''<< at %s:%d\n",__FILE__,__LINE__);
381 return NULL;
382 }
383#ifdef __CYGWIN__ // stupid WINNT sometimes gives you argv[0] within ""
384 if (*feArgv0 == '"')
385 {
386 int l = strlen(feArgv0);
387 if (feArgv0[l-1] == '"')
388 {
389 feArgv0[l-1] = '\0';
390 feArgv0++;
391 }
392 }
393#endif
394#ifdef RESOURCE_DEBUG
395 printf("feGetExpandedExecutable: calling find_exec with \"%s\"\n", feArgv0);
396#endif
397 char executable[MAXRESOURCELEN];
398 char* value = omFindExec(feArgv0, executable);
399#ifdef RESOURCE_DEBUG
400 printf("feGetExpandedExecutable: find_exec exited with \"%s\": %d\n", executable, access(executable, X_OK));
401#endif
402 if (value == NULL)
403 {
404 printf("Bug >>Could not get expanded executable from \"%s\"<< at %s:%d\n",feArgv0,__FILE__,__LINE__);
405 return NULL;
406 }
407 return strdup(value);
408}
VAR char * feArgv0
Definition feResource.cc:19
#define MAXRESOURCELEN
#define strdup
Definition omAllocFunc.c:18
char * omFindExec(const char *name, char *exec)
Definition omFindExec.c:315

◆ feGetResource()

char * feGetResource ( const char id,
int warn )

Definition at line 145 of file feResource.cc.

146{
147 return feResource(feGetResourceConfig(id), warn);
148}
static feResourceConfig feGetResourceConfig(const char id)
static char * feResource(feResourceConfig config, int warn)

◆ feGetResourceConfig() [1/2]

static feResourceConfig feGetResourceConfig ( const char * key)
static

Definition at line 221 of file feResource.cc.

222{
223 int i = 0;
224 while (feResourceConfigs[i].key != NULL)
225 {
226 if (strcmp(feResourceConfigs[i].key, key) == 0)
227 return &(feResourceConfigs[i]);
228 i++;
229 }
230 return NULL;
231}
VAR feResourceConfig_s feResourceConfigs[]
Definition feResource.cc:41

◆ feGetResourceConfig() [2/2]

static feResourceConfig feGetResourceConfig ( const char id)
static

Definition at line 210 of file feResource.cc.

211{
212 int i = 0;
213 while (feResourceConfigs[i].key != NULL)
214 {
215 if (feResourceConfigs[i].id == id) return &(feResourceConfigs[i]);
216 i++;
217 }
218 return NULL;
219}

◆ feInitResource()

static char * feInitResource ( feResourceConfig config,
int warn )
static

Definition at line 248 of file feResource.cc.

249{
250 /*assume(config != NULL);*/
251#ifdef RESOURCE_DEBUG
252 printf("feInitResource(config->key: '%s', warn: '%d') : entering ...\n", config->key, warn);
253#endif
254
255 char value[MAXRESOURCELEN];
256 // now we have to work
257 // First, check Environment variable
258 if (config->env != NULL)
259 {
260 char* evalue = getenv(config->env);
261 if (evalue != NULL)
262 {
263#ifdef RESOURCE_DEBUG
264 printf("feInitResource(config,warn): Found value from env:%s\n", evalue);
265#endif
266 strcpy(value, evalue);
267 if (config->type == feResBinary // do not verify binaries
268 ||
270 feCleanResourceValue(config->type, value)))
271 {
272#ifdef RESOURCE_DEBUG
273 printf("feInitResource(config,warn): Set value of config (with key: '%s') to '%s'\n", config->key, value);
274#endif
275 config->value = strdup(value);
276 return config->value;
277 }
278 }
279 }
280
281 *value = '\0';
282 // Special treatment of executable
283 if (config->id == 'S')
284 {
285 char* executable = feGetExpandedExecutable();
286 if (executable != NULL)
287 {
288#ifdef RESOURCE_DEBUG
289 printf("exec:%s\n", executable);
290#endif
291 strcpy(value, executable);
292#ifdef RESOURCE_DEBUG
293 printf("value:%s\n", value);
294#endif
295 free(executable);
296 }
297 }
298 // and bindir
299 else if (config->id == 'b')
300 {
301 char* executable = feResource('S');
302#ifdef RESOURCE_DEBUG
303 printf("feInitResource(config,warn): Get '%s' from \"%s\"\n", config->key, executable);
304#endif
305 if (executable != NULL)
306 {
307 strcpy(value, executable);
308 executable = strrchr(value, DIR_SEP);
309 if (executable != NULL) *executable = '\0';
310 }
311 }
312
313#ifdef RESOURCE_DEBUG
314 printf("value:%s\n", value);
315#endif
316
317 if (*value == '\0' && config->fmt != NULL )
318 {
319 feSprintf(value, config->fmt, warn);
320 }
321 else if (config->fmt == NULL)
322 {
323 printf("Bug >>Wrong Resource Specification of '%s'<< at \"%s:%d\"\n",config->key,__FILE__,__LINE__);
324 // TODO: printf -> WarnS???
325 return NULL;
326 }
327
328 // Clean and verify
330 feCleanResourceValue(config->type, value)))
331 {
332#ifdef RESOURCE_DEBUG
333 printf("feInitResource(config,warn): Set value of '%s' to \"%s\"\n", config->key, value);
334#endif
335 config->value = strdup(value);
336 return config->value;
337 }
338 else if (config->type == feResBinary)
339 {
340 // for binaries, search through PATH once more
341 char* executable = omFindExec(config->key, value);
342 if (executable != NULL)
343 {
345 feCleanResourceValue(config->type, value)))
346 {
347 config->value = strdup(value);
348#ifdef RESOURCE_DEBUG
349 printf("feInitResource(config,warn): Set value of '%s' to \"%s\"\n", config->key, config->value);
350#endif
351 return config->value;
352 }
353 }
354 }
355
356 // issue warning if explicitely requested, or if
357 // this value is gotten for the first time
358 if (warn > 0 || (warn < 0 && config->value != NULL))
359 {
360 printf("// ** Could not get '%s'.\n", config->key);
361 printf("// ** Either set environment variable '%s' to '%s',\n",
362 config->env, config->key);
363 feSprintf(value, config->fmt, warn);
364 printf("// ** or make sure that '%s' is at \"%s\"\n", config->key, value);
365 }
366#ifdef RESOURCE_DEBUG
367 printf("feInitResource(config,warn): Set value of '%s' to NULL", config->key);
368#endif
369 config->value = NULL;
370 return NULL;
371}
static char * feSprintf(char *s, const char *fmt, int warn=-1)
static char * feGetExpandedExecutable()
static char * feCleanResourceValue(feResourceType type, char *value)
static int feVerifyResourceValue(feResourceType type, char *value)
#define DIR_SEP
Definition feResource.h:6
char * getenv()
size_t config[4]
Definition vspace.cc:619

◆ feInitResources()

void feInitResources ( const char * argv0)

Definition at line 160 of file feResource.cc.

161{
162 if (argv0==NULL)
163 {
164 //WarnS("illegal argv[0]==NULL");
165 feArgv0 = (char*)malloc(MAXPATHLEN+strlen("/Singular"));
166 getcwd(feArgv0, MAXPATHLEN);
167 strcat(feArgv0,"/Singular");
168 }
169 else
171#ifdef RESOURCE_DEBUG
172 printf("feInitResources(argv0: '%s'): entering...\n", feArgv0);
173#endif
174 // init some Resources
175 feResource('b');
176 feResource('r');
177 // don't complain about stuff when initializing SingularPath
178 feResource('s',0);
179 feResource('P');
180}
char * argv0
#define MAXPATHLEN
Definition omRet2Info.c:22

◆ feReInitResources()

void feReInitResources ( )

Definition at line 182 of file feResource.cc.

183{
184 int i = 0;
185 while (feResourceConfigs[i].key != NULL)
186 {
187 if ((feResourceConfigs[i].value != NULL)
188 && (feResourceConfigs[i].value[0] != '\0'))
189 {
190 free(feResourceConfigs[i].value);
191 feResourceConfigs[i].value = (char *)"";
192 }
193 i++;
194 }
195#ifdef RESOURCE_DEBUG
196 printf("feInitResources(): entering...\n");
197#endif
198 // init some Resources
199 feResource('b');
200 feResource('r');
201 // don't complain about stuff when initializing SingularPath
202 feResource('s',0);
203}

◆ feResource() [1/3]

char * feResource ( const char * key,
int warn )

Definition at line 135 of file feResource.cc.

136{
137 return feResource(feGetResourceConfig(key), warn);
138}

◆ feResource() [2/3]

char * feResource ( const char id,
int warn )

Definition at line 140 of file feResource.cc.

141{
142 return feResource(feGetResourceConfig(id), warn);
143}

◆ feResource() [3/3]

static char * feResource ( feResourceConfig config,
int warn )
static

Definition at line 233 of file feResource.cc.

234{
235 if (config == NULL) return NULL;
236 if (config->value != NULL && *(config->value) != '\0') return config->value;
237 return feInitResource(config, warn);
238}
static char * feInitResource(feResourceConfig config, int warn)

◆ feResourceDefault() [1/3]

char * feResourceDefault ( const char * key)

Definition at line 155 of file feResource.cc.

156{
158}
static char * feResourceDefault(feResourceConfig config)

◆ feResourceDefault() [2/3]

char * feResourceDefault ( const char id)

Definition at line 150 of file feResource.cc.

151{
153}

◆ feResourceDefault() [3/3]

static char * feResourceDefault ( feResourceConfig config)
static

Definition at line 240 of file feResource.cc.

241{
242 if (config == NULL) return NULL;
243 char* value = (char*) malloc(MAXRESOURCELEN);
244 feSprintf(value, config->fmt, -1);
245 return value;
246}

◆ feSprintf()

static char * feSprintf ( char * s,
const char * fmt,
int warn = -1 )
static

Definition at line 650 of file feResource.cc.

651{
652 char* s_in = s;
653 if (fmt == NULL) return NULL;
654
655 while (*fmt != '\0')
656 {
657 *s = *fmt;
658
659 if (*fmt == '%' && *(fmt + 1) != '\0')
660 {
661 fmt++;
662 char* r = feResource(*fmt, warn);
663 if (r != NULL)
664 {
665 strcpy(s, r);
666 s += strlen(r) - 1;
667 }
668 else
669 {
670 s++;
671 *s = *fmt;
672 }
673 }
674 else if (*fmt == '$' && *(fmt + 1) != '\0')
675 {
676 fmt++;
677 char* v = s + 1;
678 while (*fmt == '_' ||
679 (*fmt >= 'A' && *fmt <= 'Z') ||
680 (*fmt >= 'a' && *fmt <= 'z'))
681 {
682 *v = *fmt;
683 v++;
684 fmt++;
685 }
686 fmt--;
687 *v = '\0';
688 v = getenv(s + 1);
689 if (v != NULL) strcpy(s, v);
690 s += strlen(s) - 1;
691 }
692 s++;
693 fmt++;
694 }
695 *s = '\0';
696 return s_in;
697}
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39

◆ feVerifyResourceValue()

static int feVerifyResourceValue ( feResourceType type,
char * value )
static

Definition at line 411 of file feResource.cc.

412{
413#ifdef RESOURCE_DEBUG
414 printf("feVerifyResourceValue(type: %d, value: \"%s\"): entering\n", (int)type, value);
415 printf("Access: ROK: %d, XOK: %d\n", access(value, R_OK), access(value, X_OK));
416#endif
417 switch(type)
418 {
419 case feResUrl:
420 case feResPath:
421 return 1;
422
423 case feResFile:
424 return ! access(value, R_OK);
425
426 case feResBinary:
427 case feResDir:
428 return ! access(value, X_OK);
429
430 default:
431 return 0;
432 }
433}
@ feResUrl
Definition feResource.h:20

◆ mystrcpy()

static void mystrcpy ( char * d,
char * s )
static

Definition at line 633 of file feResource.cc.

634{
635 /*assume(d != NULL && s != NULL);*/
636 while (*s != '\0')
637 {
638 *d = *s;
639 d++;
640 s++;
641 }
642 *d = '\0';
643}

Variable Documentation

◆ feArgv0

VAR char* feArgv0 = NULL

Definition at line 19 of file feResource.cc.

◆ feResourceConfigs

VAR feResourceConfig_s feResourceConfigs[]

Definition at line 41 of file feResource.cc.

42{
43 {"SearchPath", 's', feResPath, NULL,
44 "$SINGULARPATH;"
45 "%D/singular/LIB;"
46 "%r/share/singular/LIB;"
47 "%b/../share/singular/LIB;"
48 // gftables:
49 "%D/factory;"
50 "%r/share/factory;"
51 "%b/LIB;"
52 "%b/../LIB;" // not installed, shared is in .libs/Singular
53 "%b/../factory;"
54 "%b/../../factory;" // not installed, shared is in .libs/Singular
55 // path for dynamic modules, should match ProcDir:
56 "%b/MOD;"
57 "%b/../MOD;" // Singular in .libs/Singular
58 "%r/lib/singular/MOD;"
59 LIB_DIR "/singular/MOD;"
60 "%b;"
61 "%b/..", // Singular in .libs/Singular
62 (char *)""},
63 {"Singular", 'S', feResBinary,"SINGULAR_EXECUTABLE", "%d/Singular", (char *)""},
64 {"BinDir", 'b', feResDir, "SINGULAR_BIN_DIR", "", (char *)""},
65 // should be changed to %b/../lib/singular/pProcs/:
66 {"ProcDir", 'P', feResPath, "SINGULAR_PROCS_DIR",
67 "%b/MOD;"
68 "%b/../MOD;" // Singular in .libs/Singular
69 "%b/..;" // Singular in .libs/Singular, programs in .
70 "%r/lib/singular/MOD;"
71 LIB_DIR "/singular/MOD;" /*debian: -> /usr/lib/singular/MOD */
72 ,(char *)""},
73 {"RootDir", 'r', feResDir, "SINGULAR_ROOT_DIR", "%b/..", (char *)""},
74 {"DataDir", 'D', feResDir, "SINGULAR_DATA_DIR", "%b/../share/", (char *)""},
75 {"DefaultDir",'d', feResDir, "SINGULAR_DEFAULT_DIR", SINGULAR_DEFAULT_DIR, (char *)""},
76 {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%D/info/singular.info.gz", (char *)""},
77 {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%D/singular/singular.idx", (char *)""},
78 {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", DATA_TO_HTML_DIR, (char *)""},
79 {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "https://www.singular.uni-kl.de/Manual/", (char *)""},
80 {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""},
81 {"Path", 'p', feResPath, NULL, "%b;%P;$PATH", (char *)""},
82
83#ifdef __CYGWIN__
84 {"emacs", 'E', feResBinary,"ESINGULAR_EMACS", "%b/emacs.exe", (char *)""},
85 {"xemacs", 'A', feResBinary,"ESINGULAR_EMACS", "%b/xemacs.exe", (char *)""},
86 {"SingularEmacs",'M', feResBinary,"ESINGULAR_SINGULAR", "%b/Singular.exe", (char *)""},
87#else
88 {"emacs", 'E', feResBinary,"ESINGULAR_EMACS", "%b/emacs", (char *)""},
89 {"xemacs", 'A', feResBinary,"ESINGULAR_EMACS", "%b/xemacs", (char *)""},
90 {"SingularEmacs",'M', feResBinary,"ESINGULAR_SINGULAR", "%b/Singular", (char *)""},
91#endif
92 {"EmacsLoad", 'l', feResFile, "ESINGULAR_EMACS_LOAD", "%e/.emacs-singular", (char *)""},
93 {"EmacsDir", 'e', feResDir, "ESINGULAR_EMACS_DIR", "%D/singular/emacs", (char *)""},
94 {"SingularXterm",'M', feResBinary,"TSINGULAR_SINGULAR", "%b/Singular", (char *)""},
95#ifdef __CYGWIN__
96 {"rxvt", 'X', feResBinary,"RXVT", "%b/rxvt", (char *)""},
97#else
98 {"xterm", 'X', feResBinary,"XTERM", "%b/xterm", (char *)""},
99#endif
100 {"EmacsDir", 'e', feResDir, "SINGULAR_EMACS_DIR", "%r/emacs", (char *)""},
101 {NULL, 0, feResUndef, NULL, NULL, NULL}, // must be the last record
102};
#define SINGULAR_DEFAULT_DIR
Definition feResource.cc:27
@ feResUndef
Definition feResource.h:20