From: Philip Newton Date: Tue, 24 Jul 2001 06:45:55 +0000 (+0200) Subject: my C compiler has no HTML parser X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b6ff23b01d2ff9fb57873fd366877ad9c12ef0e;p=p5sagit%2Fp5-mst-13.2.git my C compiler has no HTML parser Message-ID: <20010724.064500@ID-11583.news.dfncis.de> p4raw-id: //depot/perl@11466 --- diff --git a/os2/perlrexx.c b/os2/perlrexx.c index 6c0ab93..7711783 100644 --- a/os2/perlrexx.c +++ b/os2/perlrexx.c @@ -236,7 +236,7 @@ ULONG PERLEVAL (PCSZ name, LONG rargc, const RXSTRING *rargv, #define INCL_DOSEXCEPTIONS #define INCL_DOSERRORS #define INCL_REXXSAA -#include <os2.h> +#include /* * "The Road goes ever on and on, down from the door where it began." @@ -323,15 +323,15 @@ ULONG PERL (PCSZ name, LONG rargc, const RXSTRING *rargv, ULONG ret; if (rargc != 1) { - sprintf(retstr->strptr, "one argument expected, got %ld", rargc); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "one argument expected, got %ld", rargc); + retstr->strlength = strlen (retstr->strptr); return 1; } - if (rargv[0].strlength >= sizeof(buf)) { - sprintf(retstr->strptr, + if (rargv[0].strlength >= sizeof(buf)) { + sprintf(retstr->strptr, "length of the argument %ld exceeds the maximum %ld", rargv[0].strlength, (long)sizeof(buf) - 1); - retstr->strlength = strlen (retstr->strptr); + retstr->strlength = strlen (retstr->strptr); return 1; } @@ -354,8 +354,8 @@ ULONG PERL (PCSZ name, LONG rargc, const RXSTRING *rargv, ret = 1; else { ret = 0; - sprintf(retstr->strptr, "%s", "ok"); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "%s", "ok"); + retstr->strlength = strlen (retstr->strptr); } PERL_SYS_TERM1(0); return ret; @@ -365,8 +365,8 @@ ULONG PERLEXIT (PCSZ name, LONG rargc, const RXSTRING *rargv, PCSZ queuename, PRXSTRING retstr) { if (rargc != 0) { - sprintf(retstr->strptr, "no arguments expected, got %ld", rargc); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "no arguments expected, got %ld", rargc); + retstr->strlength = strlen (retstr->strptr); return 1; } PERL_SYS_TERM1(0); @@ -377,21 +377,21 @@ ULONG PERLTERM (PCSZ name, LONG rargc, const RXSTRING *rargv, PCSZ queuename, PRXSTRING retstr) { if (rargc != 0) { - sprintf(retstr->strptr, "no arguments expected, got %ld", rargc); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "no arguments expected, got %ld", rargc); + retstr->strlength = strlen (retstr->strptr); return 1; } if (!my_perl) { - sprintf(retstr->strptr, "no perl interpreter present"); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "no perl interpreter present"); + retstr->strlength = strlen (retstr->strptr); return 1; } perl_destruct(my_perl); perl_free(my_perl); my_perl = 0; - sprintf(retstr->strptr, "%s", "ok"); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "%s", "ok"); + retstr->strlength = strlen (retstr->strptr); return 0; } @@ -400,15 +400,15 @@ ULONG PERLINIT (PCSZ name, LONG rargc, const RXSTRING *rargv, PCSZ queuename, PRXSTRING retstr) { if (rargc != 0) { - sprintf(retstr->strptr, "no argument expected, got %ld", rargc); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "no argument expected, got %ld", rargc); + retstr->strlength = strlen (retstr->strptr); return 1; } if (!init_perl(1)) return 1; - sprintf(retstr->strptr, "%s", "ok"); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "%s", "ok"); + retstr->strlength = strlen (retstr->strptr); return 0; } @@ -420,8 +420,8 @@ ULONG PERLEVAL (PCSZ name, LONG rargc, const RXSTRING *rargv, char *str; if (rargc != 1) { - sprintf(retstr->strptr, "one argument expected, got %ld", rargc); - retstr->strlength = strlen (retstr->strptr); + sprintf(retstr->strptr, "one argument expected, got %ld", rargc); + retstr->strlength = strlen (retstr->strptr); return 1; } @@ -446,11 +446,11 @@ ULONG PERLEVAL (PCSZ name, LONG rargc, const RXSTRING *rargv, if (SvTRUE(ERRSV) || !SvOK(res)) ret = 1; str = SvPV(res, len); - if (len <= 256 /* Default buffer is 256-char long */ - || !DosAllocMem((PPVOID)&retstr->strptr, len, + if (len <= 256 /* Default buffer is 256-char long */ + || !DosAllocMem((PPVOID)&retstr->strptr, len, PAG_READ|PAG_WRITE|PAG_COMMIT)) { - memcpy(retstr->strptr, str, len); - retstr->strlength = len; + memcpy(retstr->strptr, str, len); + retstr->strlength = len; } else ret = 1;