home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
gened10.zip
/
SAMPLE.H
< prev
next >
Wrap
Text File
|
1996-04-03
|
2KB
|
55 lines
/*
* Created 1993 IBM Corp. *
* *
* DISCLAIMER OF WARRANTIES. The following [enclosed] code is *
* sample code created by IBM Corporation. This sample code is not *
* part of any standard or IBM product and is provided to you solely *
* for the purpose of assisting you in the development of your * *
* applications. The code is provided "AS IS", without *
* warranty of any kind. IBM shall not be liable for any damages *
* arising out of your use of the sample code, even if they have been *
* advised of the possibility of such damages. * *
*/
/*************************
* PROTOTYPES
*************************
*/
/* the following is the prototype of the user writing routine */
unsigned long mywrite(char *buf, unsigned long buflen, void *usrparms);
/* the following is the prototype of the user reading routine */
unsigned long myread(char *buf, unsigned long buflen, void *usrparms);
/* the following are the prototypes of the user-exits for the passing of the
* content */
int mycontent (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent2 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent3 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent4 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent5 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent6 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent7 (char **buff, unsigned long *buflen, enum lastflag *lastf);
int mycontent8 (char **buff, unsigned long *buflen, enum lastflag *lastf);
/* the following is the prototype of the user-exit for decoding */
int mydec(unsigned short ndx, struct gds *p, char *content,
unsigned long contlen, void *usrparms);
static
void readmodtype(char *readbuf, int buflen, char **readmod);
static
char *readline(char *buf);
char * mallocate(unsigned n);
/****************
* MACROS
****************
*/
#define UNDEFLENGTH -1L
#define NEW(t) ((t *) mallocate((unsigned) sizeof(t)))
#define NEW2(n, t) ((t *) mallocate((unsigned) ((n) * sizeof(t))))