summaryrefslogtreecommitdiff
path: root/NetWare/testnlm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-16 19:46:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-16 19:46:38 +0000
commit2986a63f7e513cf37f46db9f211b77071260031f (patch)
tree9a6e62602396938ea5a612420f53ebf267e8d941 /NetWare/testnlm
parent87b11a197a59fac210fc9265bde0ef1ffe36de89 (diff)
downloadperl-2986a63f7e513cf37f46db9f211b77071260031f.tar.gz
NetWare port from Guruprasad S <SGURUPRASAD@novell.com>.
p4raw-id: //depot/perl@10643
Diffstat (limited to 'NetWare/testnlm')
-rw-r--r--NetWare/testnlm/echo/echo.c31
-rw-r--r--NetWare/testnlm/type/type.c48
2 files changed, 79 insertions, 0 deletions
diff --git a/NetWare/testnlm/echo/echo.c b/NetWare/testnlm/echo/echo.c
new file mode 100644
index 0000000000..fe468c3ffa
--- /dev/null
+++ b/NetWare/testnlm/echo/echo.c
@@ -0,0 +1,31 @@
+/**********************************************************************
+*
+* C Source: echo.c
+* Instance: idc_rads_2
+* Description: DOS echo Emulation
+* %created_by: smscm %
+* %date_created: Fri Apr 20 19:05:31 2001 %
+*
+**********************************************************************/
+#ifndef lint
+static char *_csrc = "@(#) %filespec: echo.c~1 % (%full_filespec: echo.c~1:csrc:idc_rads#3 %)";
+#endif
+
+#include <stdio.h>
+//#include <process.h>
+#include "clibstuf.h"
+
+void main (int argc, char** argv)
+{
+ fnInitGpfGlobals();
+ if (argc>1 && argv[1]!=NULL && strcmp(argv[1],"-d")==0) {
+ int n;
+ for (n=0; n < argc; n++) {
+ printf("%2d: '%s'\n", n, argv[n]);
+ }
+ } else {
+ while (--argc) {
+ printf("%s%c", *++argv, argc==1 ? '\n' : ' ');
+ }
+ }
+}
diff --git a/NetWare/testnlm/type/type.c b/NetWare/testnlm/type/type.c
new file mode 100644
index 0000000000..8d5c394255
--- /dev/null
+++ b/NetWare/testnlm/type/type.c
@@ -0,0 +1,48 @@
+/**********************************************************************
+*
+* C Source: type.c
+* Instance: idc_rads_2
+* Description: DOS type Emulation
+* %created_by: smscm %
+* %date_created: Fri Apr 20 19:05:34 2001 %
+*
+**********************************************************************/
+#ifndef lint
+static char *_csrc = "@(#) %filespec: type.c~1 % (%full_filespec: type.c~1:csrc:idc_rads#3 %)";
+#endif
+
+#include <stdio.h>
+#include <nwfattr.h>
+#include "clibstuf.h"
+
+void main (int argc, char** argv)
+{
+ FILE* pfile = NULL;
+ int k;
+ int thechar;
+ char* defaultDir;
+
+ fnInitGpfGlobals();
+ SetCurrentNameSpace(NWOS2_NAME_SPACE);
+ defaultDir = getenv("PERL_ROOT");
+ if (!defaultDir || (strlen(defaultDir) == 0))
+ defaultDir = "sys:\\perl\\scripts";
+ chdir(defaultDir);
+
+ k = 1;
+ while (k < argc)
+ {
+ // open the next file and print it out
+ pfile = fopen(argv[k],"r");
+ if (pfile)
+ {
+ while ((thechar = getc(pfile)) != EOF)
+ {
+ if (thechar != 0x0d)
+ printf("%c",thechar);
+ }
+ fclose (pfile);
+ }
+ k++;
+ }
+}