IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2005, 1:04:22 PM (21 years ago)
Author:
eugene
Message:

cleanups so -Wall -Werror succeed, some .h reorgs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/scheduler.c

    r4686 r4689  
    77# define opihi_rcfile ".schedrc"
    88
    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 
    189/* program-dependent initialization */
    1910void initialize (int argc, char **argv) {
    2011 
    21   FILE *f;
    22 
    2312  auto_break = TRUE;
    2413
     
    5544  set_str_variable ("PROMPT", opihi_prompt);
    5645  set_str_variable ("RCFILE", opihi_rcfile);
    57 # define xstr(s) str(s)
    58 # define str(s) #s
    5946# ifdef HELPDIR_DEFAULT
    60   set_str_variable ("HELPDIR", xstr(HELPDIR_DEFAULT));
     47  set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
    6148# endif
    6249
    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  }
    7760
    7861  signal (SIGINT, SIG_IGN);
     
    8063}
    8164
     65/* standard welcome message */
     66void welcome () {
     67  fprintf (stderr, "\n");
     68  fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description);
     69}
     70
    8271/* add program-dependent exit functions here */
    8372void cleanup () {
    84   /* -libdisplay
    8573  QuitImage ();
    86   QuitGraph (); */
     74  QuitGraph ();
     75  QuitController ();
    8776  return;
    8877}
Note: See TracChangeset for help on using the changeset viewer.