Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncsu.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!mcnc!ncsu!jcz From: jcz@ncsu.UUCP (John A. Toebes, VIII) Newsgroups: net.micro.amiga,net.games.hack Subject: Amiga Hack Source Message-ID: <3005@ncsu.UUCP> Date: Wed, 19-Feb-86 23:29:35 EST Article-I.D.: ncsu.3005 Posted: Wed Feb 19 23:29:35 1986 Date-Received: Fri, 21-Feb-86 07:25:07 EST Organization: SAS Institute Inc. Lines: 69 Xref: watmath net.micro.amiga:2048 net.games.hack:1326 As promised, I am now posting the source to HACK 1.0.1 on the Amiga. It is being posted in net.sources in 13 pieces: part1 contains the include files parts2 through 9 contain the fairly machine independant sources part10 countains those sources and include files particular to the Amiga part11 contains the runtime data files required by Hack part12 contains the Amiga .info files and Icons part13 contains a binary dump of the executable. In order to make it easier to download to the amiga, I suggest that you leave the sources together in the grouped files and break them up when you get them to the Amiga (I make no guarentees on how well it will compile on other machines although it appears to be ok on our Apollo) The format of the source files is simple, at the start of each file is a line of the form #file where is the name of the file. The program below will break up a file into its individual components. To use it, CD to the directory that you wish to hold the sources, then execute the program (I call it Explode) redirecting the input to the file to be broken up: ie CD DF1: EXPLODE main() { char buffer[128]; FILE *fp; fp = NULL; while(gets(buffer) != NULL) { if (!strncmp(buffer,"#file ", 6)) { if (fp != NULL) fclose(fp); if ( (fp = fopen(buffer+6,"w")) == NULL) { printf("Cannot open file '%s'\n", buffer+6); exit(1); } printf("Writing '%s'\n", buffer+6); } else if (fp == NULL) { printf("No file open\n"); exit(2); } else fprintf(fp,"%s\n",buffer); } if (fp != NULL) fclose(fp); } -------------------end of source -------------------- John A. Toebes, VIII 120-H Northington Place Cary NC 27511 (919) 469-4210 Usenet: ...!mcnc!ncsu!jcz