diff -c2 server.c.original server.c
*** server.c.original	Thu May 14 19:41:35 1992
--- server.c	Fri Dec  4 16:54:51 1992
***************
*** 5,8 ****
--- 5,12 ----
  */
  
+ /* Changes by David H Post, Design Research Institute, post@cs.cornell.edu
+  * Fall 1992:  Added code for SMART server command-line option.
+  */
+ 
  /* this file is a server process for a unix machine that takes input from 
     standard in or from a socket and searches the local search engine on the 
***************
*** 98,102 ****
   */
  
! #define SERVER_DATE "Sun May 10 1992"
  
  #ifndef lint
--- 102,106 ----
   */
  
! #define SERVER_DATE "Dec 1992"
  
  #ifndef lint
***************
*** 156,159 ****
--- 160,168 ----
  FILE *logfile; /* the logfile */
  
+ char* smart_cmd = NULL; 
+   /* If set by command line option, call SMART for IR with this command.
+      Single arg is database name.  Pass SMART commands thru stdin,
+      receive results via stdout.  Used in irsearch.c, irretrvl.c.  */
+ 
  /*---------------------------------------------------------------------------*/
  
***************
*** 424,428 ****
    host_address[0] = 0;
  
!   server_name = s_malloc(255);
    gethostname(server_name, 255);
  
--- 433,437 ----
    host_address[0] = 0;
  
!   server_name = s_malloc(255);  /* defined/used in irsearch.c (run_search) */
    gethostname(server_name, 255);
  
***************
*** 471,474 ****
--- 480,484 ----
      fprintf(stderr," -cmmem number: percentage of CM memory to use (CM code only).\n");
      fprintf(stderr," -v prints the version.\n");
+     fprintf(stderr," -smart command:  Use command to call SMART for IR.\n");
      exit(1);
    }
***************
*** 525,528 ****
--- 535,543 ----
        if(cm_mem_percent > 100)
  	panic("Warning: The -cmmem parameter was %ld%%. It should be between 1-100.", cm_mem_percent);
+     }
+     else if(0 == strcmp("-smart", next_argument)){
+       if(NULL == (next_argument = next_arg(&argc, &argv)))
+ 	panic("Expected SMART command following -smart");
+       smart_cmd = next_argument;
      }
      else{
