home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / FED_PLUS.EXE / OBJECT.C < prev    next >
C/C++ Source or Header  |  1994-07-23  |  1KB  |  63 lines

  1. static char rcsid[] = "$Id: object.c,v 1.6 1993/10/15 18:49:55 libes Exp $";
  2.  
  3. /*
  4.  * This software was developed by U.S. Government employees as part of
  5.  * their official duties and is not subject to copyright.
  6.  *
  7.  * $Log: object.c,v $
  8.  * Revision 1.6  1993/10/15  18:49:55  libes
  9.  * CADDETC certified
  10.  *
  11.  * Revision 1.5  1993/02/22  21:48:18  libes
  12.  * added arg to ERRORabort
  13.  *
  14.  * Revision 1.4  1992/08/18  17:16:22  libes
  15.  * rm'd extraneous error messages
  16.  *
  17.  * Revision 1.3  1992/06/08  18:08:05  libes
  18.  * prettied up interface to print_objects_when_running
  19.  */
  20.  
  21. #define OBJECT_C
  22. #include "object.h"
  23.  
  24. /*ARGSUSED*/
  25. Symbol *
  26. UNK_get_symbol(Generic x)
  27. {
  28.     fprintf(stderr,"OBJget_symbol called on object of unknown type\n");
  29.     ERRORabort(0);
  30. //#if defined(lint) || defined(CENTERLINE)
  31.     return 0;
  32. //#endif 
  33.     
  34. }
  35.  
  36. /*
  37. ** Procedure:    OBJinitialize
  38. ** Parameters:    -- none --
  39. ** Returns:    void
  40. ** Description:    Initialize the Object module
  41. */
  42.  
  43. void
  44. OBJinitialize()
  45. {
  46.     int i;
  47.  
  48.     OBJ = (struct Object *)malloc(MAX_OBJECT_TYPES*sizeof (struct Object));
  49.     for (i=0;i<MAX_OBJECT_TYPES;i++) {
  50.         OBJ[i].get_symbol = UNK_get_symbol;
  51.         OBJ[i].type = "of unknown_type";
  52.         OBJ[i].bits = 0;
  53.     }
  54. }
  55.  
  56. void
  57. OBJcreate(char type,struct Symbol *(*get_symbol)(Generic),char *printable_type,int bits)
  58. {
  59.     OBJ[type].get_symbol = get_symbol;
  60.     OBJ[type].type = printable_type;
  61.     OBJ[type].bits = bits;
  62. }
  63.