~ubuntu-branches/ubuntu/vivid/gcl/vivid

« back to all changes in this revision

Viewing changes to o/sfasli.c

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-03-04 14:29:59 UTC
  • Revision ID: james.westby@ubuntu.com-20020304142959-dey14w08kr7lldu3
Tags: upstream-2.5.0.cvs20020219
ImportĀ upstreamĀ versionĀ 2.5.0.cvs20020219

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#ifndef STAND
 
29
  coerce_to_filename(symbol_value(sSAsystem_directoryA),
 
30
                     system_directory);
 
31
#endif
 
32
#ifndef RSYM_COMMAND
 
33
  sprintf(command,"%srsym %s %s",system_directory,kcl_self,tmpfile1);
 
34
#else
 
35
  RSYM_COMMAND(command,system_directory,kcl_self,tmpfile1);
 
36
#endif   
 
37
  if (system(command) != 0)
 
38
#ifdef STAND
 
39
    FEerror("The rsym command %s failed .",1,command);
 
40
#else
 
41
    FEerror("The rsym command ~a failed .",1,
 
42
            make_simple_string(command));
 
43
#endif
 
44
  read_special_symbols(tmpfile1);
 
45
  unlink(tmpfile1);
 
46
  qsort((char*)(c_table.ptable),(int)(c_table.length),sizeof(struct node),node_compare);
 
47
}
 
48