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/dimm/dimm.c

    r2598 r4689  
    77# define opihi_rcfile ".dimmrc"
    88
    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 
    199/* program-dependent initialization */
    2010void initialize (int argc, char **argv) {
    2111 
    22   FILE *f;
    23 
    2412  auto_break = TRUE;
    2513
     
    4230  InitBasic ();
    4331  InitData ();
     32  InitOutfile ();
    4433  InitAstro ();
    4534  InitDIMM ();
    46   InitOutfile ();
    4735
    4836  rl_readline_name = opihi_name;
     
    5240  set_str_variable ("PROMPT", opihi_prompt);
    5341  set_str_variable ("RCFILE", opihi_rcfile);
     42# ifdef HELPDIR_DEFAULT
     43  set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     44# endif
    5445
    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  }
    6956
    7057  signal (SIGINT, SIG_IGN);
     
    7259}
    7360
     61/* standard welcome message */
     62void welcome () {
     63  fprintf (stderr, "\n");
     64  fprintf (stderr, "Welcome to %s - %s\n\n", opihi_name, opihi_description);
     65}
     66
    7467/* add program-dependent exit functions here */
    7568void cleanup () {
    76   /* -libdisplay */
    7769  QuitImage ();
    7870  QuitGraph ();
Note: See TracChangeset for help on using the changeset viewer.