59 #define RXQUEUE_CLEAR -2
60 #define BAD_MESSAGE -6
62 #define ENVBUFSIZE 256
63 #define LINEBUFSIZE 65472
65 #define DLLNAME "rexx.dll"
72 const char *queuename ) ;
75 static bool get_line(
char *,
size_t,
size_t *);
85 const char *quename = NULL;
103 for (i = 1; i < argc; i++)
106 if ((t[0]==
'/') || (t[0]==
'-'))
110 if (stricmp(t,
"/FIFO") == 0 &&
queuemode == -1)
114 else if (stricmp(t,
"/LIFO") == 0 &&
queuemode == -1)
118 else if (stricmp(t,
"/CLEAR") == 0 &&
queuemode == -1)
125 else if (quename == NULL)
213 const char *quename )
216 char DataArea[ 256 ] ;
217 char DataArea2[ 256 ] ;
227 memset(DataArea, 0,
sizeof(DataArea)) ;
274 if (LoadString(hDll, MsgNumber, DataArea,
sizeof(DataArea)))
279 char *pInsert = NULL;
282 strcpy(DataArea2, DataArea);
283 pInsert = strstr(DataArea2,
"%1");
288 sprintf(DataArea, DataArea2, quename);
294 strcpy(DataArea,
"Error, but no error message available.");
299 strcpy(DataArea,
"Error, but no error message available because REXX.DLL not loaded.");
309 printf(
"REX%d: %s\n", MsgNumber, DataArea);
336 static char savechar =
'\0';
337 static bool eof =
false;
350 *buffer++ = savechar;
355 actual = fread(&newchar, 1, 1, stdin);
356 while (!ferror(stdin))
375 actual = fread(&newchar, 1, 1, stdin);
377 if (!ferror(stdin) && actual != 0 && newchar !=
'\n')
383 else if (newchar ==
'\n')
388 else if (newchar == 0x1a)
403 if (length < bufsize)
410 actual = fread(&newchar, 1, 1, stdin);
#define Error_RXQUE_nomem
#define Error_RXQUE_access
#define Error_RXQUE_notinit
#define Error_RXQUE_syntax
#define Error_RXQUE_exist
RexxReturnCode REXXENTRY RexxClearQueue(CONSTANT_STRING)
RexxReturnCode REXXENTRY RexxAddQueue(CONSTANT_STRING, PCONSTRXSTRING, size_t)
CONSTANT_RXSTRING * PCONSTRXSTRING
#define MAKERXSTRING(r, p, l)
RexxReturnCode REXXENTRY RexxQueryQueue(CONSTANT_STRING, size_t *)
int __cdecl main(int argc, char *argv[])
static bool get_line(char *, size_t, size_t *)
static void options_error(int type, const char *queuename)