1*74a4d8c2SCharles.ForsythThis file contains a make shell script and a version 2*74a4d8c2SCharles.Forsythof the file missing95.c for the Mac, courtesy of 3*74a4d8c2SCharles.ForsythDan Allen. 4*74a4d8c2SCharles.Forsyth 5*74a4d8c2SCharles.Forsythmake shell script: 6*74a4d8c2SCharles.Forsyth 7*74a4d8c2SCharles.Forsyth# MPW Shell script to build Awk using Apple's MRC compiler. 8*74a4d8c2SCharles.Forsyth# 22 Jan 1999 - Created by Dan Allen. 9*74a4d8c2SCharles.Forsyth# 25 Mar 1999 - Updated for newer Awk. 10*74a4d8c2SCharles.Forsyth# 11*74a4d8c2SCharles.Forsyth# Porting notes for the Mac: 12*74a4d8c2SCharles.Forsyth# 13*74a4d8c2SCharles.Forsyth# 1. main in main.c needs to have its prototype changed to: 14*74a4d8c2SCharles.Forsyth# 15*74a4d8c2SCharles.Forsyth# int main(int argc, char *argv[], char *environ[]) 16*74a4d8c2SCharles.Forsyth# 17*74a4d8c2SCharles.Forsyth# 2. popen and pclose in missing95.c need to have as their body the 18*74a4d8c2SCharles.Forsyth# older style 19*74a4d8c2SCharles.Forsyth# 20*74a4d8c2SCharles.Forsyth# return NULL; 21*74a4d8c2SCharles.Forsyth# 22*74a4d8c2SCharles.Forsyth# as parallel pipes are not supported by MPW. 23*74a4d8c2SCharles.Forsyth# 24*74a4d8c2SCharles.Forsyth# 3. To make your Mac more responsive while long awk scripts run, 25*74a4d8c2SCharles.Forsyth# you may want to add some SpinCursor calls to support cooperative multitasking. 26*74a4d8c2SCharles.Forsyth# 27*74a4d8c2SCharles.Forsyth# All of these minor changes can be put under "#ifdef powerc" for portability's sake. 28*74a4d8c2SCharles.Forsyth# 29*74a4d8c2SCharles.Forsyth# 30*74a4d8c2SCharles.Forsyth 31*74a4d8c2SCharles.ForsythIf {1} == "clean" 32*74a4d8c2SCharles.Forsyth Delete -i awk maketab maketab.c.o ytab.c.o b.c.o main.c.o parse.c.o proctab.c proctab.c.o tran.c.o lib.c.o run.c.o lex.c.o missing95.c.o 33*74a4d8c2SCharles.ForsythElse 34*74a4d8c2SCharles.Forsyth MRC ytab.c -w off -opt speed 35*74a4d8c2SCharles.Forsyth MRC b.c -w off -opt speed 36*74a4d8c2SCharles.Forsyth MRC main.c -w off -opt speed 37*74a4d8c2SCharles.Forsyth MRC parse.c -w off -opt speed 38*74a4d8c2SCharles.Forsyth MRC maketab.c -w off -opt speed 39*74a4d8c2SCharles.Forsyth PPCLink -o maketab maketab.c.o "{PPCLibraries}InterfaceLib" "{PPCLibraries}MathLib" "{PPCLibraries}StdCLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}PPCToolLibs.o" -t MPST -c 'MPS ' 40*74a4d8c2SCharles.Forsyth maketab > proctab.c 41*74a4d8c2SCharles.Forsyth MRC proctab.c -w off -opt speed 42*74a4d8c2SCharles.Forsyth MRC tran.c -w off -opt speed 43*74a4d8c2SCharles.Forsyth MRC lib.c -w off -opt speed 44*74a4d8c2SCharles.Forsyth MRC run.c -w off -opt speed 45*74a4d8c2SCharles.Forsyth MRC lex.c -w off -opt speed 46*74a4d8c2SCharles.Forsyth MRC missing95.c -w off -opt speed 47*74a4d8c2SCharles.Forsyth PPCLink -o awk ytab.c.o b.c.o main.c.o parse.c.o proctab.c.o tran.c.o lib.c.o run.c.o lex.c.o missing95.c.o "{PPCLibraries}InterfaceLib" "{PPCLibraries}MathLib" "{PPCLibraries}StdCLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}PPCToolLibs.o" -d 48*74a4d8c2SCharles.Forsyth SetFile awk -d . -m . -t MPST -c 'MPS ' 49*74a4d8c2SCharles.ForsythEnd 50*74a4d8c2SCharles.Forsyth 51*74a4d8c2SCharles.Forsyth 52*74a4d8c2SCharles.Forsythmissing95.c for the Mac: 53*74a4d8c2SCharles.Forsyth 54*74a4d8c2SCharles.Forsyth/* popen and pclose are not available on the Mac. */ 55*74a4d8c2SCharles.Forsyth 56*74a4d8c2SCharles.Forsyth#include <stdio.h> 57*74a4d8c2SCharles.Forsyth 58*74a4d8c2SCharles.ForsythFILE *popen(char *s, char *m) { 59*74a4d8c2SCharles.Forsyth return NULL; 60*74a4d8c2SCharles.Forsyth} 61*74a4d8c2SCharles.Forsyth 62*74a4d8c2SCharles.Forsythint pclose(FILE *f) { 63*74a4d8c2SCharles.Forsyth return NULL; 64*74a4d8c2SCharles.Forsyth} 65*74a4d8c2SCharles.Forsyth 66