Changeset 4714 for trunk/Ohana/src/opihi/dvo2/dvo2.c
- Timestamp:
- Aug 5, 2005, 9:53:49 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo2/dvo2.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo2/dvo2.c
r2598 r4714 7 7 # define opihi_rcfile ".dvorc" 8 8 9 void InitBasic ();10 void InitData ();11 void InitAstro ();12 void InitDVO2 ();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 26 Nlists = 0;27 ALLOCATE (lists, List, 1);28 29 /* init functions required by libraries */30 /* -libopihi */31 InitCommands ();32 InitMacros ();33 InitBuffers ();34 InitVectors ();35 InitVariables ();36 37 /* -libdisplay */38 InitGraph ();39 InitImage ();40 13 41 14 /* load the commands used by this implementation */ … … 44 17 InitAstro (); 45 18 InitDVO2 (); 46 InitOutfile ();47 19 48 20 rl_readline_name = opihi_name; … … 52 24 set_str_variable ("PROMPT", opihi_prompt); 53 25 set_str_variable ("RCFILE", opihi_rcfile); 26 # ifdef HELPDIR_DEFAULT 27 set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT)); 28 # endif 54 29 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); 30 { /* check history file permission */ 31 FILE *f; 32 f = fopen (opihi_history, "a"); 33 if (f == NULL) /* no current history file here */ 34 fprintf (stderr, "can't save history.\n"); 35 else 36 fclose (f); 37 stifle_history (200); 38 read_history (opihi_history); 39 } 69 40 70 41 signal (SIGINT, SIG_IGN); … … 72 43 } 73 44 45 /* standard welcome message */ 46 void welcome () { 47 fprintf (stderr, "\n"); 48 fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description); 49 } 50 74 51 /* add program-dependent exit functions here */ 75 52 void cleanup () { 76 /* -libdisplay 53 /* -libdisplay */ 77 54 QuitImage (); 78 QuitGraph (); */55 QuitGraph (); 79 56 return; 80 57 }
Note:
See TracChangeset
for help on using the changeset viewer.
