home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / gcl-1.000 / gcl-1 / gcl-1.0 / c / sfasli.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-24  |  1022 b   |  43 lines

  1.  
  2. /* 
  3. Copyright William Schelter. All rights reserved. */
  4.  
  5.  
  6.  
  7. int node_compare();
  8.  
  9.  
  10. struct node *
  11. find_sym_ptable(name)
  12.   char *name;
  13.   {struct node joe,*answ;
  14.    joe.string=name;
  15.    answ =  (struct node *)  bsearch((char *)(&joe),(char*) (c_table.ptable),
  16.              c_table.length,
  17.              sizeof(struct node), node_compare);
  18.  
  19.    return answ;
  20.  }
  21.        
  22.  
  23. build_symbol_table()
  24. { char tmpfile1[50];
  25.   char command [250];
  26.   printf("Building symbol table for %s ..\n",kcl_self);fflush(stdout);
  27.   sprintf(tmpfile1,"rsym%d",getpid());
  28.   coerce_to_filename(symbol_value(siVsystem_directory),
  29.              system_directory);
  30. #ifndef RSYM_COMMAND
  31.   sprintf(command,"%srsym %s %s",system_directory,kcl_self,tmpfile1);
  32. #else
  33.   RSYM_COMMAND(command,system_directory,kcl_self,tmpfile1);
  34. #endif   
  35.   if (system(command) != 0)
  36.     FEerror("The rsym command ~a failed .",1,
  37.         make_simple_string(command));
  38.   read_special_symbols(tmpfile1);
  39.   unlink(tmpfile1);
  40.   qsort((char*)(c_table.ptable),(int)(c_table.length),sizeof(struct node),node_compare);
  41. }
  42.  
  43.