Fun with vDOS (Emulation)
> There's only three files: README, G.C, and (optional) CRT0.ASM , so
> (famous last words) it shouldn't be that hard to recompile.
>
> Problem #1: G471SRC.ZIP is using an old compression method ("Implode"),
> although Info-Zip still supports it. More crucial is the fact that he
> probably used PKZIP, which (at least DOS version) always capitalizes the
> filenames (bad!). So "G.C" [sic] is the source, which GCC thinks is C++ !!
or you can do (bash specific, can be done portably with tr):
for file in *;do mv $file ${file,,};done
This will renam everythinge to lowercase.
> BTW, I'm not *nix savvy at all (in case that wasn't obvious). So I have no
> clue what "caddr_t" is or how to use "mmap()" correctly. I did hack at it
> to compile, and it seemed to work okay, but I might've done it wrong. It's
> a bit weird to read because of the various #ifdef stuff in there (DOS,
> UNIX). Honestly, I would email somebody who knows this stuff, probably
> Ncurses maintainer (Thomas Dickey), to see what is going on. Though keep in
> mind he'll probably just tell you to use VILE instead (which does helpfully
> hop around #ifdef with '%' key).
>
> So I'm assuming he used mmap() for speed. I'm also assuming that the DOS
> version is a fallback of a simpler way of doing things. So I assume that
> will still work on Linux. So, inside Disk_to_mem(), I changed "#if DOS" to
> "#if 1" and "#if UNIX" to "#if 0". Then the only problem is that O_BINARY
> is undeclared, but they don't need or use that on *nix, so comment that
> out.
>
> Then, it compiles okay for me. "echo $LINES" under ROXTerm here says "34"
> (although I don't remember how, when, why, or if I set that manually). So
> that's more than 25, right? So my limited testing should be acceptable
> here. Okay, it runs, everything is green on black, and typing "4030" jumps
> to that line. Down arrow brings me to the main text, and it seems to show
> lines 4030 through 4060. So I guess it works.
>
> Patch follows (but beware, you need hard tabs in the makefile).
>
>
> diff -waNBU0 old/G.C new/G.C
> --- old/G.C 2015-01-07 14:21:32.000000000 -0600
> +++ new/G.C 2015-01-07 14:23:25.000000000 -0600
> @@ -4023 +4023 @@
> -#if DOS
> +#if 1 //DOS
> @@ -4028 +4028 @@
> -#if UNIX
> +#if 0 //UNIX
> @@ -4043,2 +4043,2 @@
> -#if DOS
> - setmode( fd, O_BINARY );
> +#if 1 //DOS
> + //setmode( fd, O_BINARY );
> @@ -4070 +4070 @@
> -#if UNIX
> +#if 0 //UNIX
> diff -waNBU0 old/GNUmakefile new/GNUmakefile
> --- old/GNUmakefile 1969-12-31 18:00:00.000000000 -0600
> +++ new/GNUmakefile 2015-01-07 14:24:33.000000000 -0600
> @@ -0,0 +1,7 @@
> +CC = gcc
> +CFLAGS = -O2 -s -lncurses -w -x c
> +
> +g: G.C
> + $(CC) $(CFLAGS) $< -o $@
> + ls -l $@
> + ldd $@
>
Or you can just do this:
#ifndef caddr_t
#define caddr_t char*
#endif
Credits to: http://computer-programming-forum.com/47-c-language/556a90938d01f023.htm
Complete thread:
- Fun with vDOS - Dennis, 16.10.2014, 21:01 (Emulation)
- Fun with vDOS - Wengier, 17.10.2014, 02:48
- Fun with vDOS - marcov, 17.10.2014, 10:59
- Fun with vDOS - Dennis, 18.10.2014, 04:25
- Fun with vDOS - marcov, 19.10.2014, 14:11
- Fun with vDOS - Wengier, 22.10.2014, 21:47
- Fun with vDOS - marcov, 19.10.2014, 14:11
- Fun with vDOS - Dennis, 18.10.2014, 04:25
- Fun with vDOS - Dennis, 18.10.2014, 04:14
- Fun with vDOS - Wengier, 19.10.2014, 00:06
- Fun with vDOS - Dennis, 19.10.2014, 03:15
- Fun with vDOS - Wengier, 17.01.2016, 00:58
- Fun with vDOS - Dennis, 19.10.2014, 03:15
- Fun with vDOS - Wengier, 19.10.2014, 00:06
- Fun with vDOS - bocke, 18.10.2014, 06:45
- Fun with vDOS - Wengier, 19.10.2014, 00:18
- Fun with vDOS - Wengier, 22.10.2014, 21:42
- Fun with vDOS - bocke, 25.10.2014, 21:10
- Fun with vDOS - Wengier, 25.10.2014, 22:19
- Fun with vDOS - Wengier, 30.10.2014, 02:55
- Fun with vDOS - bocke, 30.10.2014, 22:10
- Fun with vDOS - bocke, 04.11.2014, 01:16
- Fun with vDOS - Wengier, 04.11.2014, 03:20
- Fun with vDOS - bocke, 04.11.2014, 15:12
- Fun with vDOS - Wengier, 04.11.2014, 21:42
- Fun with vDOS - bocke, 05.11.2014, 16:02
- Fun with vDOS - bocke, 06.11.2014, 20:42
- Fun with vDOS - Wengier, 04.11.2014, 21:42
- Fun with vDOS - nidud, 04.11.2014, 23:15
- Fun with vDOS - Wengier, 05.11.2014, 01:09
- Fun with vDOS - nidud, 05.11.2014, 23:38
- Fun with vDOS - Wengier, 05.11.2014, 01:09
- Fun with vDOS - bocke, 04.11.2014, 15:12
- Fun with vDOS - bocke, 16.03.2015, 10:48
- Fun with vDOS - Wengier, 04.11.2014, 03:20
- Fun with vDOS - bocke, 25.10.2014, 21:10
- Fun with vDOS - marcov, 17.10.2014, 10:59
- Fun with vDOS - RayeR, 17.10.2014, 13:43
- Fun with vDOS - Dennis, 17.10.2014, 17:14
- Fun with vDOS - Wengier, 17.10.2014, 18:00
- Fun with vDOS - RayeR, 17.10.2014, 20:17
- Fun with vDOS - Dennis, 18.10.2014, 04:30
- Fun with vDOS - Wengier, 17.10.2014, 18:00
- Fun with vDOS - Dennis, 17.10.2014, 17:14
- Fun with vDOS - bocke, 18.10.2014, 07:24
- Fun with vDOS - glennmcc, 18.10.2014, 22:01
- Fun with vDOS - bocke, 19.10.2014, 01:11
- Fun with vDOS - glennmcc, 18.10.2014, 22:01
- Fun with vDOS - Dennis, 19.10.2014, 03:44
- Fun with vDOS - Dennis, 07.01.2015, 18:25
- Fun with vDOS - Rugxulo, 07.01.2015, 21:30
- Fun with vDOS - Dennis, 07.01.2015, 22:15
- Fun with vDOS - bretjohn, 08.01.2015, 01:33
- Fun with vDOS - Dennis, 08.01.2015, 03:45
- Fun with vDOS - RayeR, 09.01.2015, 20:25
- Fun with vDOS - Dennis, 09.01.2015, 21:52
- Fun with vDOS - RayeR, 09.01.2015, 20:25
- Fun with vDOS - Dennis, 08.01.2015, 03:45
- Fun with vDOS - Rugxulo, 13.01.2015, 18:06
- Fun with vDOS - Dennis, 13.01.2015, 20:14
- Fun with vDOS - bretjohn, 08.01.2015, 01:33
- Fun with vDOS - bocke, 16.03.2015, 11:10
- Fun with vDOS - Dennis, 07.01.2015, 22:15
- Fun with vDOS - Rugxulo, 07.01.2015, 21:30
- Fun with vDOS - Wengier, 17.10.2014, 02:48