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