Changeset 4689 for trunk/Ohana/src/opihi/pantasks/scheduler.c
- Timestamp:
- Jul 31, 2005, 1:04:22 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pantasks/scheduler.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/scheduler.c
r4686 r4689 7 7 # define opihi_rcfile ".schedrc" 8 8 9 void InitBasic ();10 void InitData ();11 void InitSched ();12 13 void welcome () {14 fprintf (stderr, "\n");15 fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description);16 }17 18 9 /* program-dependent initialization */ 19 10 void initialize (int argc, char **argv) { 20 11 21 FILE *f;22 23 12 auto_break = TRUE; 24 13 … … 55 44 set_str_variable ("PROMPT", opihi_prompt); 56 45 set_str_variable ("RCFILE", opihi_rcfile); 57 # define xstr(s) str(s)58 # define str(s) #s59 46 # ifdef HELPDIR_DEFAULT 60 set_str_variable ("HELPDIR", xstr(HELPDIR_DEFAULT));47 set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT)); 61 48 # endif 62 49 63 /* here we open the history file for append. it this fails, we 64 won't be able to write to it, warn the user. otherwise, this 65 creates the file readline will write to, if it did not exist */ 66 67 /* check history file */ 68 /* rewrite with fstat or stat */ 69 f = fopen (opihi_history, "a"); 70 if (f == NULL) /* no current history file here */ 71 fprintf (stderr, "can't save history.\n"); 72 else 73 fclose (f); 74 75 stifle_history (200); 76 read_history (opihi_history); 50 { /* check history file permission */ 51 FILE *f; 52 f = fopen (opihi_history, "a"); 53 if (f == NULL) /* no current history file here */ 54 fprintf (stderr, "can't save history.\n"); 55 else 56 fclose (f); 57 stifle_history (200); 58 read_history (opihi_history); 59 } 77 60 78 61 signal (SIGINT, SIG_IGN); … … 80 63 } 81 64 65 /* standard welcome message */ 66 void welcome () { 67 fprintf (stderr, "\n"); 68 fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description); 69 } 70 82 71 /* add program-dependent exit functions here */ 83 72 void cleanup () { 84 /* -libdisplay85 73 QuitImage (); 86 QuitGraph (); */ 74 QuitGraph (); 75 QuitController (); 87 76 return; 88 77 }
Note:
See TracChangeset
for help on using the changeset viewer.
