]> git.pld-linux.org Git - packages/dosemu.git/commitdiff
- patch by Bart Oldeman, taken from linux-msdos mailling list
authorjuandon <witekfl@pld-linux.org>
Fri, 10 May 2002 20:04:28 +0000 (20:04 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- now ERRORLEVEL has hopefully correct value (eg. Arachne works better)

Changed files:
    dosemu-comcom.patch -> 1.1

dosemu-comcom.patch [new file with mode: 0644]

diff --git a/dosemu-comcom.patch b/dosemu-comcom.patch
new file mode 100644 (file)
index 0000000..60271e0
--- /dev/null
@@ -0,0 +1,35 @@
+--- dosemu-1.0.2/src/plugin/commands/comcom.c.orig     Fri May 10 20:50:04 2002
++++ dosemu-1.0.2/src/plugin/commands/comcom.c  Fri May 10 20:57:14 2002
+@@ -104,6 +104,7 @@
+ struct res_dta {
+       struct batchdata *current_bdta;
+       int exitcode;
++      int errorlevel; /* exit code for external commands */
+       int need_errprinting;
+       int echo_on;
+       int envsize;    /* size of enlarged enviroment */
+@@ -1277,7 +1278,7 @@
+       if (!strcasecmp(argv[argi], "errorlevel")) {
+               if (argi+2 >= argc) return DOS_EINVAL;
+               level = strtoul(argv[argi+1], 0, 10);
+-              if (((EXITCODE >= level) ? 1 : 0) ^ invers) {
++              if (((rdta->errorlevel >= level) ? 1 : 0) ^ invers) {
+                       argi += 2;
+                       SET_CHILD_ARGS(argi);
+                       dopath_exec(argc-argi, argv+argi);
+@@ -2740,6 +2741,7 @@
+       saved_cannotexit = rdta->cannotexit;
+       rdta->cannotexit = 0;
+       ret =  load_and_run_DOS_program(name, cmdline);
++      rdta->errorlevel = ret;
+       rdta->cannotexit = saved_cannotexit;
+       /* re-enlarge the environment to maximum */
+@@ -3256,6 +3258,7 @@
+       rdta->need_errprinting = 0;
+       EXITCODE = 0;
++      rdta->errorlevel = 0;
+       ECHO_ON = 1;
+       /* first free all memory we don't need for ourselves, such that
This page took 0.105035 seconds and 4 git commands to generate.