Timothe Litt 61c8001044 Bug fixes and compiler warnings. Unix readline support, pass 1
Fix various compiler warnings.

Fix bug causing double free when a file isn't found.

Fix bug using uninitialized variable parsing null filename.

Fix bug causing crash when format 3 retrieval pointer encountered.

Add support for readline (command line editing and history on Unix)

Untangle NT I/O so it builds without the direct access SCSI API & works.

Report errors as text messages everywhere.

Add MSVC project files.

Implement most of dir/full

Partially implement XABITM

Add help to command tables.

Allow choice of VMS qualifiers or Unix options.
  mount /write // /dev/cdrom
or
  mount -write /dev/cdrom

Parse quoted strings as command parameters.
   Mount /write "/dev/cdrom"
   search [*...]*.txt "My words for you"

Resolve command, parameter & qualifier ambiguity from tables.

Consolidate the various makefiles into a common file with very small
platform-specific wrappers.  This simplifies maintenance.

Add diskio module to allow easy access to .iso images and simulator files.
Removes requirement for loop device or equivalent.  Builds as a separate
executable.

Writes to the ODS2 volumes are broken.
2016-02-26 17:46:46 -05:00

46 lines
1.5 KiB
Plaintext

$ gccflag := 'cc'
$ if f$extract(0,3,gccflag).nes."GCC" then gccflag=""
$
$ if gccflag.nes.""
$ then p1="/optim=level=3/warn=all"+p1
$ else p1="/warn=enabl=(defunct,obsolescent,questcode,uninit,unused)"+p1
$ endif
$
$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" .and. gccflag.eqs.""
$ then p1 = "/INCLUDE=SYS$DISK:[]"+p1
$ endif
$ default=f$parse(f$environment("PROCEDURE"),,,"DEVICE","SYNTAX_ONLY")+ -
f$parse(f$environment("PROCEDURE"),,,"DIRECTORY","SYNTAX_ONLY")
$ set def 'default'
$
$ call cc ods2 'p1'
$ call cc ods2 'p1'+"/object=ods2i.obj/define=DISKIMAGE"
$ call cc rms 'p1'
$ call cc direct 'p1'
$ call cc diskio 'p1'
$ call cc access 'p1'
$ call cc device 'p1'
$ call cc cache 'p1'
$ call cc phyvms 'p1'
$ call cc update 'p1'
$ call cc sysmsg 'p1'
$ call cc vmstime 'p1'
$
$ write sys$error "''f$time()' Linking..."
$ if gccflag.nes."" .and. f$getsyi("HW_MODEL").lt.1024
$ then library = ",vaxcrtl.tmp/option"
$ create vaxcrtl.tmp
sys$share:vaxcrtl/share
$ endif
$ link 'p2' /exe=ods2i.exe ods2i,rms,direct,access,device,cache,diskio,sysmsg,vmstime,update 'library'
$ link 'p2' ods2,rms,direct,access,device,cache,phyvms,sysmsg,vmstime,update 'library'
$ write sys$error "''f$time()' Done"
$ exit
$
$cc: subroutine
$!$ if f$search(p1+".obj;").nes."" then if f$cvtime(f$file(p1+".obj;","CDT")).ges.f$cvtime(f$file(p1+".c;","CDT")) then exit
$ write sys$error "''f$time()' Compiling ''p1'..."
$ cc 'p2' 'p1'
$ exit
$ endsubroutine