home *** CD-ROM | disk | FTP | other *** search
- batch BASICINIT:
- let include = d:\bc\inc
- let exe = f:\program.exe
- return
-
- batch H:
- menu Tech help !:
- cp d:\th
- help
- end
- batch B:
- menu Binary editor by TRC:
- bed
- end
- batch S:
- menu NO debug info:
- for i 11 99
- touch $i
- loop
- batch E:
- let debug = 0
- end
- batch A:
- menu Debug info ON:
- let debug = 1
- end
-
- batch D:
- cp f:\
- d:\bc\bin\td386 -VP -VG $exe $cmdline
- errexit
- end
-
- batch R:
- batch run
- $exe $cmdline
- errexit
- end
-
- batch F:
- menu Profiler:
- cp f:\
- d:\bc\bin\tf386 -VP -VG $exe
- errexit
- end
-
- batch N:
- menu COMMAND.COM:
- command
- end
- menu Borland C++ IDE:
- cp d:\bc\bin
- bc
- return
- batch M:
- mem
- pause
- end
- batch T:
- for i 11 99
- touch $i
- loop
- end
-
- macro Y:
- displayoff
- t = 0
- do
- type " "
- Backspace
- a = fileno
- Alt Right
- loop while a <> fileno
- restorepos
- return
-
- batch O:
- c:\util\trc\colors
- pause
- end
-
- batch C:
- gosub compile
- pause
- gosub run
- end
-
- menu Print Clipboard
- batch P
- `prntab 3
- `copy c:\source\_prj\clipfile.cws prn:
- return
-
- batch Compile:
-
- echo ************* Building %exe **************
-
- create $0
-
- if not *objdir
- let objdir = #exe
- endif
-
- let link = #objdir\llist.lnk
- let compile = #objdir\clist.lst
- let mustlink
- let mustbcc
-
- create $compile
- create $link
-
- append $link d:\bc\lib\c0$model.obj
- if $debug = 1
- appendln $compile -v
- endif
- appendln $compile -V -H -D$macro -C -Od
- appendln $compile -I$include;#16
- appendln $compile -K -O -Z -c -m$model -w -vi -n#objdir -H=F:\h.sym
- appendln $compile $bccargs
- if $ovy = 1
- appendln $compile -Y
- endif
- appendln $compile
-
- for file
- if &file = c or &file = cpp
- if $file > #objdir\%file.obj
- echo %file
- if $ovy = 1
- add $compile -Yo $file -Yo-
- else
- add $compile $file
- endif
- let mustlink = 1
- let mustbcc = 1
- endif
- appendln $link +
- if $ovy = 1
- append $link /o #objdir\%file.obj /o-
- else
- append $link #objdir\%file.obj
- endif
- elif &file = ca
- if $file > #objdir\%file.obj
- echo %file
- add $compile $file
- let mustlink = 1
- let mustbcc = 1
- endif
- appendln $link +
- append $link #objdir\%file.obj
- elif &file = asm
- if $file > #objdir\%file.obj
- echo %file
- out1
- d:\bc\bin\tasm /m10 /mx $file,#objdir\%file.OBJ
- errexit
- stdout
- let mustlink = 1
- endif
- appendln $link +
- append $link #objdir\%file.obj
- elif &file = h
- out1
- if $mustbcc = 1
- echo --- BCC ---
- d:\bc\bin\bcc @$compile
- let mustbcc
- create $compile
- errexit
- endif
- if $debug = 1
- appendln $compile -v
- endif
- appendln $compile -V -H -D$macro -C -Od
- appendln $compile -I$include;#file
- appendln $compile -K -O -Z -c -m$model -w -vi -n#objdir -H=F:\h.sym
- appendln $compile $bccargs
- if $ovy = 1
- appendln $compile -Y
- endif
- appendln $compile
- stdout
- elif gosub compile_&file
- else
- if $file > #objdir\%file.obj
- echo %file
- d:\bc\bgi\bgiobj $file #objdir\%file.obj _%file
- let mustlink = 1
- endif
- appendln $link +
- append $link #objdir\%file.obj
- endif
- loop
- cp #objdir\
- appendln $link
- appendln $link $exe
- appendln $link
- for file
- if $file . lib
- appendln $link $file +
- endif
- loop
- if $ovy = 1
- appendln $link d:\bc\lib\overlay +
- endif
- if $math = 1
- appendln $link d:\bc\lib\emu d:\bc\lib\math$model +
- endif
- appendln $link d:\bc\lib\c$model
- out1
- if $mustbcc = 1
- echo --- BCC ---
- d:\bc\bin\bcc @$compile
- errexit
- endif
- if $mustlink = 1
- stdout
- echo --- LINK ---
- `type $link
- out1
- if $debug = 1
- d:\bc\bin\tlink /s /v /l /c @$link
- else
- d:\bc\bin\tlink /s /l /c @$link
- endif
- errexit
- else
- echo No files to compile or link (%exe actual)
- endif
- echo ------------------------------------
- stdout
- return
-
-
- edit fnt:
- cp c:\util
- c:\util\fdes
- return
-
- edit cgr:
- c:\util\ced $file
- return
-
- edit lib:
- echo Can't edit this type of file..
- pause
- return
-
- macro testwarning:
- displayoff
- findstore
- find$ = "Warning"
- findglobal = 0
- findword = 0
- findcase = 0
- _Warning$ = ""
- if fileno then ^E
- ^PageUp
- if find then _Warning$ = "1"
- Esc
- findrestore
- return
-
- macro findstore:
- f_f$ = find$
- f_r$ = replace$
- f_g = findglobal
- f_w = findword
- f_c = findcase
- return
-
- macro findrestore:
- find$ = f_f$
- replace$ = f_r$
- findglobal = f_g
- findword = f_w
- findcase = f_c
- return
-
- macro lines:
- displayoff
- setfile 16
- t = 0
- do
- t = t + lastline
- a = fileno
- Alt Right
- loop while a <> fileno
- say "This project consists of", t, "lines"
- restorepos
- return
-
- macro gotos:
- displayoff
- findstore
- find$ = "goto"
- findglobal = 0
- findword = 1
- findcase = 1
- setfile 16
- t = 0
- do
- ^PageUp
- do while find
- t = t + 1
- loop
- ^R
- a = fileno
- Alt Right
- loop while a <> fileno
- say "This project includes", t, "goto statements"
- findrestore
- restorepos
- return
-
- macro =F1.CPP:
- macro =F1.C:
- findstore
- displayoff
- findglobal = 0
- findword = 1
- findcase = 1
- ^Right
- ^Left
- a = column
- b = a
- do while ucase(line$(b)) >= "A" and ucase(line$(b)) <= "Z" or line$(b) = "_"
- b = b + 1
- loop
- if a = b
- a$ = line$(a)
- elif a < b
- a$ = line$(a to b - 1)
- else
- error "No identifier !"
- endif
- a$ = line$(a to b - 1)
- return
- displayon
- setfile 15
- text_lock = 1
- text_tabsize = 3
- a$ = findfirst$ _include$ + "\\*.H"
- while a$ <> ""
- loadfile a$
- ^PageUp
- exitif find
- loop
- Left
- findrestore
- return
-
- macro ^f1.C:
- macro ^f1.CPP:
- macro ^f1.CA:
- macro ^f1.H:
- macro ^f1.HPP:
- a = (70 - len line$) / 2
- b = 70 - len line$ - a
- if a < 0 or b < 0 then error "Remark too long"
- line$ = "/*" + string$(a, "*") + " " + line$ + " " + string$(b, "*") + "*/"
- home
- return
-
-