home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / gened10.zip / GDSPROTO.H < prev    next >
Text File  |  1996-04-03  |  11KB  |  264 lines

  1. /*** $PROLOG(C,INCLUDE) **********************************************/
  2. /*                                                                   */
  3. /*  INCLUDE NAME : GDSPROTO                                          */
  4. /*                                                                   */
  5. /*  DESCRIPTIVE NAME : GDSED library functions prototypes            */
  6. /*                                                                   */
  7. /*  STATUS :                                                         */
  8. /*                                                                   */
  9. /*    RELEASE : 1.0.0                                                */
  10. /*    MODIFICATION : 0                                               */
  11. /*    DATE : 930930                                                  */
  12. /*                                                                   */
  13. /*  DESCRIPTION :  prototypes of the functions of the GDSED runtime  */
  14. /*                 library                                           */
  15. /*                                                                   */
  16. /*  MODULE TYPE : INCLUDE FILE                                       */
  17. /*                                                                   */
  18. /*      SIZE :                                                       */
  19. /*                                                                   */
  20. /*  CHANGE ACTIVITY :                                                */
  21. /*                                                                   */
  22. /*  $INC(GDSPROTO),COMP(GDS),    PROD(GDS)    : MODULE DESCRIPTOR    */
  23. /*                                                                   */
  24. /*  FLAG REASON   RLSE     DATE   ORIGIN  FLAG DESCRIPTOR            */
  25. /*  ---- -------- -------- ------ ------  -------------------------  */
  26. /*  $X0= GDSED    100      930930   RNSL: IMPLICIT FLAG, ORIGINAL    */
  27. /*  $Y1= xxxxxxxx nnn      yymmdd _logo_: _____Description_______    */
  28. /*                                                                   */
  29. /*                                                                   */
  30. /*** $EPROLOG(C,INCLUDE) *********************************************/
  31. /*********************************************************************/
  32. /*  Licensed Materials - Property of IBM                             */
  33. /*                                                                   */
  34. /*  GenE/D version 1.00 - 5648-075                                   */
  35. /*  Copyright (C) International Business Machines Corp., 1993        */
  36. /*  All rights reserved                                              */
  37. /*********************************************************************/
  38.  
  39. extern int
  40. GDSaddmodule(void *module_ptr,    /* pointer to the current module */
  41.              void *environmnt);   /* environment pointer */
  42.  
  43. extern int
  44. GDSallocateContentsArray(void *module_ptr,   /* pointer to the current module */
  45.                 struct contents_str **cont); /* pointer to contents array */
  46.  
  47.  
  48. extern int
  49. GDSallocateContListArray(long numitems,     /* number of items */
  50.                 struct content_str **cont); /* array of allocated structures */
  51.  
  52.  
  53. extern int
  54. GDSallocateGdsTreeArray(void *module_ptr,   /* pointer to the current module */
  55.                      struct gds ***gdsptr); /* array of pointers inside the GDS
  56.                                              * structure tree */
  57.  
  58. extern int
  59. GDSbasetype(void **module_ptr,    /* pointer to the current module */
  60.             unsigned short *t,    /* metatable index */
  61.             enum basetypes *bt);  /* base type */
  62.  
  63. extern int
  64. GDSdecber(struct gds **p,            /* pointer to GDS structure tree */
  65.           unsigned long buflen,      /* input buffer length */
  66.           unsigned long *bytesnum,   /* number of decoded bytes */
  67.           char **alldata,            /* input: flag indicating if the input
  68.                                       *        buffer contains all the data
  69.                                       * output: pointer to the input buffer if
  70.                                       *         alldata is 1 */
  71.           void *environmnt,          /* environment pointer */
  72.           void *usrparms);           /* user parms for reading user-exit */
  73.  
  74. extern int
  75. GDSdecgdsd(struct gds **p,           /* pointer to GDS structure tree */
  76.            unsigned long buflen,     /* input buffer length */
  77.            unsigned long *bytesnum,  /* number of decoded bytes */
  78.            void *module_ptr,         /* pointer to the current module */
  79.            unsigned short *metandx,  /* metatable index */
  80.            struct gds **gdsptr,      /* array of pointers inside the GDS
  81.                                       * structure tree */
  82.            struct errdata *err_data, /* error information */
  83.            void *environmnt,         /* environment pointer */
  84.            void *decusrparms,        /* user parameters for dec user-exit */
  85.            void *usrparms);          /* user parms for reading user-exit */
  86.  
  87. extern int
  88. GDSdecode(void *module_ptr,        /* pointer to the current module */
  89.           unsigned short *t,       /* metatable index */
  90.           struct gds **p,          /* pointer to the GDS structure tree */
  91.           struct gds **gds_ptr,    /* array of pointers inside the GDS
  92.                                     * structure tree */
  93.           void *environmnt,        /* environment pointer */
  94.           void *usrparms);         /* user parameters */
  95.  
  96. extern int
  97. GDSencber(struct gds **p,             /* pointer to GDS structure tree */
  98.           unsigned long buflen,       /* output buffer length */
  99.           unsigned char **out_buffer, /* output buffer pointer */
  100.           unsigned long *bytesnum,    /* number of encoded bytes */
  101.           int indef_length,           /* definite or indefinite length form */
  102.           void *environmnt,           /* environment pointer */
  103.           void *usrparms);            /* user parms for writing user-exit */
  104.  
  105. extern int
  106. GDSencgdsd(struct gds **p,            /* pointer to GDS structure tree */
  107.            unsigned long buflen,      /* output buffer length */
  108.            unsigned long *bytesnum,   /* number of encoded bytes */
  109.            useLLIDFISS useseg,        /* flag indicating if LLIDFISS
  110.                                        * segmentation is used or not */
  111.            void *environmnt,          /* environment pointer */
  112.            void *usrparms);           /* user parms for writing user-exit */
  113.  
  114. extern int
  115. GDSencode(void *module_ptr,    /* pointer to current module */
  116.           unsigned short *t,   /* metatable index of type */
  117.           struct contents_str
  118.              *cont_array_ptr,  /* pointer to contents array */
  119.           struct gds **p,      /* pointer to GDS structure tree */
  120.           enum TypOfEnc tenc,  /* type of encoding: BER or GDSD */
  121.           void *environmnt,    /* environment pointer */
  122.           void *usrparms);     /* user parameters, passed to enc user-exit */
  123.  
  124. extern void *
  125. GDSfindmodule(const char *mname,  /* module name */
  126.               void *environmnt);  /* environment pointer */
  127.  
  128. extern int
  129. GDSfindtbl(const void *module_ptr,  /* pointer to current module */
  130.            const char *symname,     /* table name */
  131.            unsigned short *fdex);   /* metatable index of table */
  132.  
  133. extern int
  134. GDSfindtype(const void *module_ptr, /* pointer to current module */
  135.             const char *symname,    /* type name */
  136.             unsigned short *fdex);  /* metatable index of type */
  137.  
  138. extern int
  139. GDSfindval(const void *module_ptr,  /* pointer to current module */
  140.            const char *symname,     /* value name */
  141.            unsigned short *fdex);   /* metatable index of value */
  142.  
  143. extern int
  144. GDSfirstmodule(void **module_ptr,   /* pointer to current module */
  145.                char **modname,      /* module name */
  146.                void *environmnt);   /* environment pointer */
  147.  
  148. extern void
  149. GDSfreeContentsArray(void *module_ptr,           /* pointer to current module */
  150.                      struct contents_str *cont); /* pointer to contents array */
  151.  
  152. extern void
  153. GDSfreeEnvironment(void *environmnt);   /* environment pointer */
  154.  
  155. extern void
  156. GDSfreegds(struct gds * p,              /* pointer to GDS structure tree */
  157.            void *environmnt);           /* environment pointer */
  158.  
  159. extern void
  160. GDSfreeGdsTreeArray(struct gds **gdsptr);   /* array of pointers inside the GDS
  161.                                              * structure tree */
  162.  
  163. extern void
  164. GDShex2str(char *outbuf,
  165.            long outlen,
  166.            char *inbuf,
  167.            long inlen);
  168.  
  169. extern
  170. int GDSinitEnvironment(void **environmnt);
  171.  
  172. extern
  173. int GDSINTEGERtolong(char *buf,
  174.                      long loc,
  175.                      long *l);
  176.  
  177. extern int
  178. GDSlngs2OID(long a[],
  179.             unsigned char *buf,
  180.             int buflen,
  181.             int *loc,
  182.             int compress);
  183.  
  184. extern int
  185. GDSlongtoINTEGER(long l,
  186.                  unsigned char *buf,
  187.                  long *loc);
  188.  
  189. extern int
  190. GDSnewgds(struct gds **gds,
  191.           char *modname,
  192.           char *symname,
  193.           struct ietag * it,
  194.           enum tagclass cls,
  195.           unsigned long id,
  196.           enum frm form,
  197.           char *contents,
  198.           long loc,
  199.           enum stg contstg,
  200.           int (*usrcontent) (char **, unsigned long *, enum lastflag *),
  201.           void *environmnt);
  202.  
  203. extern int
  204. GDSOIDtolngs(char *buf,
  205.              int loc,
  206.              long *a,
  207.              int asize);
  208.  
  209. extern int
  210. GDSprintgds(struct gds * p,
  211.             int indentcol,
  212.             long maxcontlen,
  213.             long rowlen,
  214.             FILE *tracefile,
  215.             enum TypOfEnc tenc);
  216.  
  217. extern int
  218. GDSPrintUnresolvedImports(FILE *outfile,
  219.                           void *environmnt);
  220.  
  221. extern int
  222. GDSreaddatfile(char *fn,
  223.                void *environmnt);
  224.  
  225. extern int
  226. GDSresolveallimports(void *environmnt);
  227.  
  228. extern int
  229. GDSresolveimports(void *module_ptr,
  230.                   void *environmnt);
  231.  
  232. extern void
  233. GDSsetUsrDec(int (*gdsusdec) (unsigned short ndx, struct gds *p,
  234.                               char *content, unsigned long contlen,
  235.                               void *usrparms),
  236.              void *environmnt);
  237.  
  238. extern void
  239. GDSsetUsrEnc(int (*gdsusenc) (struct encinh ia,
  240.                               struct encinhsyn *sa,
  241.                               enum tagclass cls, long id, enum frm form,
  242.                               char *encsubs),
  243.              void *environmnt);
  244.  
  245. extern void
  246. GDSsetUsrRead(unsigned long (*usrred) (char *buff, unsigned long buflen,
  247.                                        void *usrparms),
  248.               void *environmnt);
  249.  
  250. extern void
  251. GDSsetUsrWrite(unsigned long (*usrwrt) (char *buff, unsigned long buflen,
  252.                                         void *usrparms),
  253.                void *environmnt);
  254.  
  255. extern void
  256. GDSstr2hex(char *outbuf, long outlen, char *inbuf, long inlen);
  257.  
  258. extern
  259. char *GDStypestr(enum basetypes base);
  260.  
  261. extern int
  262. GDSunloadmodule(void *module_ptr,
  263.                 void *environmnt);
  264.