home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0
- Programmers Utilities
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright 1988, Michael A. Eissinger.
- All Rights Reserved.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Introduction
-
- This small set of DOS programmer's utilities are designed to make
- life just a bit easier. Unix is a rich operating system for
- programmers, offering a vast array of useful, if not always used
- tools. Some of the utilities included here provide functions
- similar to those available in Unix, others offer functions not
- present in either Unix or MS/DOS.
-
- The Utilities Extract, Indent and SGCvert and SGTest as well as
- the Unit SGDisp.tpu are all for TP4. Indent and Extract can also
- be used with Turbo Pascal Version 2 or 3.
-
- The remaining utilities - BldBat, Paste, Meld and PutCurs are for
- batch file building, modification and use and do not require TP4
- or any other programming language.
-
- This package is released as ShareWare, and as such are not
- released by the author to the public domain. These are
- copyrighted programs and remain the property of the author. To
- register please send $25.00 to
-
- Michael A. Eissinger
- Microcomputer Consultant
- 346 East Cedar
- Hanford, CA 93230
- 209-582-5830
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 2
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Batch File Utilities
- BldBat - Batch File Build Utility
-
- BldBat (Build Batch) is a simple little utility that provides a
- function similar to using Unix's LS command with the file
- option. In other words, it builds a text file of the filenames
- specified in the command line parameters. Unlike using DIR and
- redirecting the output to a file, BldBat only writes the actual
- filenames to the resulting output text file.
-
- Syntax
-
- BldBat <filemask> <outputfilename>
-
- where <filemask> is any valid MS/DOS file mask - wild cards are
- supported and outputfilename is a valid DOS filename, normally
- .bat. BldBat does not assume/impose any specific file extensions,
- so the user can specify any or no filename extension.
-
- If <outputfilename> already exists, BldBat will notify the user
- and ask if it should be overwritten. If the user responds [Y]
- for yes, the existing file will be overwritten. [N] terminates
- BldBat and returns to the DOS commandline.
-
- examples
-
- BldBat \*.bat temp.txt
-
- produces a text file that looks like this . . .
-
- autoexec.bat
- shutdown.bat
- .
- .
- temp.bat
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 3
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Paste - Unix-like paste command
-
- Unix offers the PASTE command to allow two files to be merged.
- PASTE takes a line from the first file, appends a line from the
- second file and writes the newly created line to a third file.
- This version of PASTE differs somewhat from the Unix equivalent,
- however, these differences are slight.
-
- Syntax
-
- PASTE <inputfilename1> <inputfilename2> <outputfilename> n ch
-
- where
- <inputfilename1> file used to build the 1st part of each line.
- <inputfilename2> file used to build the 2nd part of each line.
- <outputfilename> resulting file.
- n - if delimited by spaces, how many spaces. Default = 1.
- ch delimiter character between the two parts of the line.
-
- If <outputfilename> already exists, PASTE will notify the user
- and ask if it should be overwritten. If the user responds [Y]
- for yes, the existing file will be overwritten. [N] terminates
- PASTE and returns to the DOS commandline.
-
- example:
- given the following two text files . . .
-
- part1.txt
-
- copy fileone.txt
- copy filetwo.txt
- copy filethr.txt
- copy filefor.txt
- copy filefiv.txt
-
- part2.txt
-
- file1.txt
- file2.txt
- file3.txt
- file4.txt
- file5.txt
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 4
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- issuing the following at the DOS command line . . .
-
- PASTE part1 part2 moveit.bat
-
- will produce the following file
-
- moveit.txt
-
- copy fileone.txt file1.txt
- copy filetwo.txt file2.txt
- copy filethr.txt file3.txt
- copy filefor.txt file4.txt
- copy filefiv.txt file5.txt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 5
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Meld
-
- Meld is sort of like paste, except that instead of butting the
- two lines together, meld writes a line from the first file, then
- on a new line a line from the second file, continuing to the end
- of the longest file. This is like shuffling a deck of cards and
- can be quite handy for taking two batch files that work on the
- same list and inserting the commands from the second batch file
- between the commands in the first.
-
- meld <inputfilename1> <inputfilename2> <outputfilename>
-
- <inputfilename1> file used to build the 1st part of each line.
- <inputfilename2> file used to build the 2nd part of each line.
- <outputfilename> resulting file.
-
- If <outputfilename> already exists, meld will notify the user
- and ask if it should be overwritten. If the user responds [Y]
- for yes, the existing file will be overwritten. [N] for no
- terminates meld and returns to the DOS commandline.
-
- Example:
-
- Lets take the file we created above using paste - moveit.txt -
- and create a new batch file that not only copies the files,
- changing the names of the new files and then deletes the
- original files.
-
- If we have another file called part3.txt that looks like . . .
-
- del fileone.txt
- del filetwo.txt
- del filethr.txt
- del filefor.txt
- del filefiv.txt
-
- we can then meld it with the moveit.txt above
-
- meld moveit.txt part3.txt moveit.bat
-
- the following batch file would then be the result.
-
- copy fileone.txt file1.txt
- del fileone.txt
- copy filetwo.txt file2.txt
- del filetwo.txt
- copy filethr.txt file3.txt
- del filethr.txt
- copy filefor.txt file4.txt
- del filefor.txt
- copy filefiv.txt file5.txt
- del filefiv.txt
-
- 5:08pm 4/19/88 User's Guide Page: 6
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- PutCurs
-
- One small utility, that is especially helpful in batch files, is
- PUTCURS. This utility will move the cursor to the designated
- line on the screen, moving the DOS prompt to the specified line.
- Any line on the screen can be addressed. Especially helpful when
- using either text files or Screen Genie .com files within batch
- file menu systems.
-
- Syntax
-
- putcurs <n> </c>
-
- where
- <n> = line number is the line to move the DOS prompt to. If
- no line number is specified, of if the line number is
- less than zero or greater than 25, the utility will
- simply move the cursor down two lines.
-
- </c> = clear screen. If this option is included, PUTCURS will
- clear the screen prior to positioning the cursor.
-
- The order of the options does not matter. They can be entered
- in either order.
-
- Line 1 is tricky. It will properly move the cursor to line 1,
- but then the cursor will jump to line two. Since cls will
- normally move the cursor to 1,1 anyway, this should pose no
- problem - simply use cls if you want the cursor to go to the
- upper corner of the screen, as normal; use PUTCURS when you want
- to put the cursor somewhere else on the screen.
-
- If using putcurs within a batch file with the echo command, add
- one to the line number you want. That will actually position the
- cursor at the right location. This may sound a bit confusing,
- however if you play with PUTCURS in its various modes, you'll
- understand just how to get it to function the way you want it to.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 7
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Pascal Utilities
- Indent - Source Indent and Case Conversion Utility
-
- Every Pascal programmer or shop has a favorite way to put code
- into the file. Some people like to use all upper case, others
- prefer all lower case, while yet others prefer the upper/lower
- case combination sometimes called the Borland Convention. Some
- programmers prefer to indent one, two, three or even four
- characters when indenting various structures in the code. These
- are highly subjective judgements on the part of the individual
- programmer or the software shop and all are "Right" depending on
- what standards are established. Sometimes code will come from a
- third party in a format different than the one that a user
- prefers. Sometimes two people working on the same project have
- deep preferences and can't even read code that is presented in a
- format other than the one that he/she is used to. These sound
- like trivial problems, but they do occur and can bring
- development to a complete standstill. There are many extensive
- "PrettyLister" programs around that will handle these problems.
- Indent is another source formatting utility that handles both
- indents and case.
-
- There are several limitations to indent, including the handling
- of some indent cases and only being able to provide all upper or
- all lower or no change in case. The case conversion functions do
- not effect literals (enclosed in single quotes) or comments.
-
- The indent functions can get confused when indenting complex
- case or record structures. These sections will have to be hand
- edited after using indent.
-
- However even with these limitations, indent can be the quickest
- way to change the case or indent structure of source code.
-
- Syntax
-
- Indent <SourceFileName>
-
- where
- <SourceFileName> Name of source file to indent.
-
- Note: Indent generates a newly indented file using the same name
- as the original file. The original file is kept in a file
- with the same name and the extension of .bak.
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 8
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Extract - Source Comment/Structure Extraction Utility
-
- Extract is a hot and dirty technical documentation utility that
- pulls out the names of all procedures and functions along with
- all inline comments. Extract simply passes a source file,
- extracting the data from the file and placing it into an output
- file. The resulting text file can be edited, just like any other
- text file.
-
- Syntax
-
- extract <SourceFileName> <ExtractFileName>
-
- where
- <SourceFileName> is the name of the original source file
- <ExtractFileName> is the name for the extract document file
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page: 9
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Screen Genie
-
- Screen Genie from Nostradamus Software is a good screen
- generator for Turbo Pascal. Under Turbo Pascal 3 Screen Genie
- provided .com files that could be loaded as externals, wrote
- code and provided editing, window and screen management
- facilities.
-
- The facilities provided here are intended as a method of
- utilizing only part of older versions of Screen Genie, and are
- by no means intended to replace the upgraded version from
- Nostradamus. Their use is limited to full screen displays and
- only work with that one area of a product that provides a great
- deal more in terms of functions, power and flexibility.
-
- SGCvert - Screen Genie Work File Conversion Utility
-
- One way that a few people used Screen Genie that was not
- documented was to use the Screen Genie work file as the screen.
- The work file is 2000 attribute/character pairs with a small
- header record. SGCvert strips off the header and converts Screen
- Genie work files into straight binary files that can either be
- used with the DisplayGenieScreen procedure in the enclosed unit
- SGDisp.tpu or converted to an .obj file using Borland's Bin2Obj
- utility.
-
- Syntax
-
- SGCvert <workfilename> <binaryfilename>
-
- where
- <workfilename> is the name used for the Screen Genie work file
- <binaryfilename> is the name for the final screen file
-
- SGTest - Screen Genie Work File Conversion Test Utility
-
- SGTest is a Screen Genie conversion test utility. Once a work
- file has been converted using the SGCvert utility, SGTest allows
- the user to test the final file without having to write a program
- to display the file. Since SGTest uses exactly the same facility
- as those provided in the SGDisp unit, SGTest shows the file as it
- would appear in the final application.
-
- Syntax
-
- sgtest <binaryfilename>
-
- where
- <binaryfilename> is the name of the screen file.
-
- SGDisp - Screen Genie Display Unit
-
-
- 5:08pm 4/19/88 User's Guide Page:10
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
- This unit provides the facility to display the binary file
- produced by SGCvert from a Screen Genie work file. The space
- required for the screen file is dynamically allocated and
- released, so the amount of program overhead is minimized. The
- TPU is selfcontained and only contains the code for the one
- procedure. The interface declaration for the procedure is . .
-
- procedure DisplayGenieScreen(filename:string);
-
- the Syntax for using this procedure is then . . .
-
- DisplayGenieScreen('file.scn');
-
- Where file.scn is the name of a valid converted file.
-
- Currently DisplayGenieScreen only provides for full screen
- displays. The windowing functions of Screen Genie are not
- supported.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page:11
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Conclusion
-
- This package of Programmer's Utilities for Turbo Pascal Version
- 4.0 are not public domain. They are the Copyrighted property of
- the author and as such are protected by all relevant copyright
- laws, provisions and treaties.
-
- This software is shareware, which means that it, like most
- shareware, may be freely copied and distributed as long as no
- consideration is required for its distribution, except a
- copying and media charge not to exceed $10.00, including the
- cost of the means of distribution (i.e. diskette). Users who
- find the programs of value to them should consider sending a
- registration to Michael A. Eissinger, Microcomputer Consultant
- at the address listed below.
-
- Users sending a dontation of $25.00 or more are registered, and
- will one years free of upgrades and one year free phone support
-
- These programs are copyrighted programs, and are protected by
- the laws of the United States and of its various states, as well
- as international treaties and conventions. A license is hereby
- granted to all persons to use these programs according to the
- terms and restrictions contained herein.
-
- These programs are distributed as-is and by its use each person
- agrees to the terms and conditions of this license, and
- acknowledges that Michael A. Eissinger, Microcomputer
- Consultant has made no warranties, either express or implied,
- concerning the performance of this software, including
- warranties of merchantability or fitness for a particular
- purpose.
-
- Please send all comments, suggestions, bug reports, donations
- and registration information to:
-
-
- Michael A. Eissinger
- Microcomputer Consultant
- 346 E. Cedar,
- Hanford, CA 93230
- 209-582-5830
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page:12
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
-
- Other Software Available
-
- Michael A. Eissinger, Microcomputer Consultant provides a
- complete line of Broadcast Management software used by radio
- stations to help manage music, requests, contests and promotions
- commercial copy and production and production room facilities.
-
- For more information on any of this software, including the
- latest catalog and prices, call Michael Eissinger, 209-582-5830.
-
- Demo and/or ShareWare versions of some of the titles are
- available.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5:08pm 4/19/88 User's Guide Page:13
-
-
-
-
-
-
-
-
-
- Turbo Pascal 4.0 Utilities
-
- Table of Contents
-
- Introduction. . . . . . . . . . . . . . . . . . . . . . . . 2
- Batch File Utilities. . . . . . . . . . . . . . . . . . . . 3
- BldBat - Batch File Build Utility . . . . . . . . . . . . 3
- Paste - Unix-like paste command . . . . . . . . . . . . . 4
- Meld. . . . . . . . . . . . . . . . . . . . . . . . . . . 6
- PutCurs . . . . . . . . . . . . . . . . . . . . . . . . . 7
- Pascal Utilities. . . . . . . . . . . . . . . . . . . . . . 8
- Indent - Source Indent and Case Conversion Utility. . . . 8
- Extract - Source Comment/Structure Extraction Utility . . 9
- Screen Genie. . . . . . . . . . . . . . . . . . . . . . . .10
- SGCvert - Screen Genie Work File Conversion Utility . . .10
- SGTest - Screen Genie Work File Conversion Test Utility .10
- SGDisp - Screen Genie Display Unit. . . . . . . . . . . .10
- Conclusion. . . . . . . . . . . . . . . . . . . . . . . . .12
- Other Software Available. . . . . . . . . . . . . . . . . .13