home *** CD-ROM | disk | FTP | other *** search
-
- program CreateFloppyCover;
- {$V-}
- (* This program reads a floppy and creates a floppy cover sheet
- Program - Disk Cover (DISKOVER)
-
- This program was written to replace the Public Domain program
- COVER. This was a good program however it has a bug in it under
- Dos 3.1. The free space routine did not work. It gave you
- improper values. The program COVER also went into the wild blue
- and hung my machine when it read a quad density (808K) diskette with
- 4 sub directories.
-
- This program also allows you to dump the data to a disk file so
- that you can print it later with PRINT. This also allows you to
- free up your machine faster.
-
- If anyone has another brand of printer they could do a quick
- patch to the source to change the Condenced and form feed characters.
- The program also does a reset to the default values at end of
- the print. If they don't have Turbo Pascal (who doesn't) they
- could patch the output print file with their own printer codes.
-
- The program is set up to allow up to 40 directories and 700 files.
- (Anything larger causes a compile error) Not many people have that on
- floppies, but it will read a hard disk also and create a mini type list.
-
- The program does not allow you to create a file DIR.DIR on the disk
- that you are reading. It assumes that the device has a removable
- recording media and that if you are creating multiple labels then
- when the program would go to read the next diskette the file DIR.DIR
- would be gone. To get a listing of the Hard Disk go to the A: drive
- and type C:DISKOVER, you could then create the file DIR.DIR on the A:
- drive. The program could also be executed from the C: drive and just
- request the printer output instead of the file output.
-
- The program uses the Volume-ID on the diskette or hard-disk and it gives
- you an option to create a volume-id if one is not on the disk. I have
- read that you can not create a volume-id from a turbo program by writing
- a file and then changing it's attribute bytes. That is a true statement
- because I tried it also but I found that if you use DOS Function call 3C
- then you can create the Volume ID. But if you do this you must also do a
- close of the file call 3E or you end up out of file handles. Take it from
- experience.
-
- Program Written and Copyright (C) by Karson W. Morrison
- Marty Morrison
- Caleb Computing Center (Numbers 13:30)
- RD 1, Box 531,
- Ringoes, New Jersey 08551
-
- Please leave this Doc file with the program and source. *)
- {-----------------------------------------------------------------------}
- { Version 1.11 }
- { Changes to expand the program to read the Hard disk and accept }
- { up to 40 directories and 1000 files }
- { and all the modifications there of. Luckily only one person }
- { had version 1.00 }
- {-----------------------------------------------------------------------}
- { Version 1.12 }
- { Change to include the Volume-ID of the disk if it is on there }
- { if a volume id is not present, an option is provided to put one on }
- { This version also included Windows. The version of windows used }
- { was created by Lynn Canning }
- { Luckily no one had version 1.11 }
- {-----------------------------------------------------------------------}
- { Version 1.13 }
- { Change to include the ability to read *.ARC files and extract the }
- { file information from them. I used the public domain routines }
- { that had been written by Michael Quinlan as a CompuServ project }
- { to create a Turbo DeArcer. I had a problem in using the Module }
- { TPARCV.PAS in that it worked for all *.ARC files I tried it on }
- { but one. The module sure looked like it was running correct, but }
- { under one strange condition the seek for a new sector on the disk }
- { actually went backwards from where it was. I rewrote the routine }
- { and it now works perfectly for that *.ARC file and all others I }
- { tried it on. Michael if your out there I would like to talk to }
- { you about this one. }
- { Reduce the number of files from 1000 to 700 because of the ARC }
- { Capability. Karson }
- {-----------------------------------------------------------------------}
- { Version 1.14 }
- { Change to include the ability to read *.LBR files and extract the }
- { file information from them. I looked at the directory information }
- { on many *.LBR files and tried to extract the information from them }
- { I found three basic types of headers (1) one with no date or time }
- { in them, but they had binary zeros in the header. (2) One that had }
- { the date as MM-DD-YY and time as HH:MM:SS. (3) one that had the }
- { date as the number of days from 1-1-78 and the time as is stored }
- { by DOS. I have included routines to handle these formats. If you }
- { find any additional formats please let me know by letter to the }
- { following address (Please) I would appreciate a diskette of the }
- { *.LBR file also. }
- { Karson }
- {-----------------------------------------------------------------------}
- { Version 1.15 }
- { Change to put a mini editor in the entry of data for Volume Id }
- { and the Diskover title message. The codes are as follows }
- { }
- { Ctrl A is left of line }
- { Ctrl F is right of line }
- { Ctrl S is left one character }
- { Ctrl D is right one character }
- { Ctrl G is delete character forward }
- { Ctrl H is delete character backward (Backspace also) }
- { Ctrl Y is delete to end of line }
- { }
- { * Note Ctrl A and Ctrl Y delete the whole line of data. * }
- { }
- { You are always in an insert mode and anything typed at the cursor }
- { causes the following characters to be moved to the right. }
- { }
- { These codes are similar to those in WordStar and Turbo. }
- { Coding by the Author with help from Borland's DataBase ToolBox }
- {-----------------------------------------------------------------------}
- { Version 1.16 January 21, 1986 }
- { Inserted coding to return the previous label with typing "F3" at }
- { the request for diskover label information. }
- {-----------------------------------------------------------------------}
- { Version 1.17 January 23, 1986 }
- { Inserted coding to use the cursor keys for editing on the diskover }
- { label information. Left, right arrow Home and end work. }
- {-----------------------------------------------------------------------}
- { This program has been written and copyright by Karson W. Morrison }
- { Marty Morrison }
- { Numbers 13:30 Caleb Computing Center }
- { Rd1 Box 531 Ringoes NJ. 08551 }
- { 201-788-1846 }
- {-----------------------------------------------------------------------}
-
- const
-
- Max_dir = 40; { Max number of directory entries }
- { it can be upped }
- MaxWin = 1; {Maximum windows open at a time}
- Max_Table_entries = 700;
- Max_Arc_Table_entries= 700;
- DirStringLength = 55; { The length of the Directory String }
- DirStringLengthMore = 69; { The length of the Dir String + file name }
- { These values are above DOS maxinum. }
-
- { Printer Constants }
- (* Epson printer controls
- *)
- Condenced_Print = #$1B#$0F; { Note this is ESC 15 for the Epson }
- Top_Of_Form = #$0C; { Note this is 12 for the Epson }
- Reset_Printer = #$1B#$40; { Note this is ESC @ for the Epson }
- Line_Spacing = #$1B#$30; { Note this is line spacing of 1/8 in }
-
- (* Okidata 92 set
- Condenced_Print = #$1D; { Note this is 17.1 CPI for the Okidata }
- Top_Of_Form = #$0C; { Note this is FF for the Okidata }
- Reset_Printer = #$18; { Note this is Clear Buffer Okidata }
- Line_Spacing = #$1B#$38; { Note this is line spacing of 1/8 in }
- *)
- Max_Print_Lines = 39; { Maximum number of print rows }
- { Counting heading and data }
-
- type
-
-
- String20 = string[20];
- String41 = string[41];
- Str80 = string[80];
- Str50 = string[50];
- String82 = string[82];
- String42 = string[42];
- String13 = string[13];
- AnyStr = string[255];
- CharSet = set of Char;
-
- SortArray = array[1..Max_Table_Entries] of String41;
-
- RegRec = { The data to pass to DOS }
- record
- AX, BX, CX, DX, BP, SI, DI, DS, ES, Flags : Integer;
- end;
- HalfRegtype = record Al,Ah,Bl,Bh,Cl,Ch,Dl,Dh:byte end;
-
- var
- { File and Drive areas }
- FileMO, { File creation Month }
- FileDA, { File creation Day }
- FileYR, { File creation Year }
- FileHR, { File creation Hour 24 hour clock }
- FileMN, { File creation Minute 60 min clock }
- ReadDrive, { This is the drive I will read }
- DefaultDrive, { This is the current default drive }
- WriteDrive : String[2]; { Drives used in reading and writing }
- DriveWanted : String[1]; { What drive do you want to read }
- VolumeIDWanted : Char; { Create Volume ID }
- FileSizeString : string[6]; { This is the file size string format }
- SortList : SortArray; { This is the array being sorted }
- ArcList : SortArray; { This is the array of files in the arc }
- NumericDriveHold, { Used in the free space on floppy drive }
- status, { Not checked on Val command }
- BegSub, { The beginning subscript }
- E, E_use, { Working integers }
- HoldDirNum, { The file Dir in integer format }
- SRN, { SortRecordNumber }
- ArcSrn, { Used in Arc file Manipulation }
- Lbrsrn, { Used in LBR file manipulation }
- SRNWork, { Used in the print of the cover }
- SRNHold, { " " " " " " " }
- SRN2ndHalf, { " " " " " " " }
- FileSiLow, { Low order byte file size }
- FileSiHigh : integer; { High order byte file size }
- RealWork, { Used in the calculation }
- TotalAreaOnDisk, { Used in calculation of space on disk }
- FreeAreaOnDisk : real; { of free area on the floppy }
- HoldDir, { Used to compare current dir }
- HoldDirSave, { Used to restore HoldDir }
- HoldDirComp, { with previous directories }
- FileDir : string[2]; { Directory Tree Subscript }
- FileNme : string[14]; { File Name }
- FileDateDos : integer; { File Creation Date Dos Format }
- FileHourDos : integer; { File Creation Time Dos Format }
- FileSiz : real; { File size }
- FileAttributes : string[3]; { Codes for System, hidden, dir etc. }
- FilVar : text; { Is it Disk: or LST: }
- MaxEntries, { Have I reached Max in the table }
- MaxArcEntries, { Have I reached Max in the table }
- GoodFileName, { This is a disk file }
- FirstTimeDrive, { First time in the Drive Routine }
- FirstTime, { First time in this routine }
- DriveOK, { Its OK to do this drive }
- NotDir : Boolean; { This is not a directory rec I read }
- Buffer, { Used in file name manipulation }
- Buffer1, { " }
- Buffer2 : String [DirStringLength];
- { " }
- DirTable : Array [ 1..Max_dir ] of string[DirSTringLength];
- { Dirs Found }
- FileHidden, { The file is a hidden file }
- FileRead, { The file is a read only file }
- FileSystem : Boolean; { The file is a system file }
- HoldDirName : String41; { used in arc handleing }
- HoldDirNameSave : String41; { used in lbr handleing }
- PrevLine : AnyStr; { used in title processing }
-
- { Dos Areas }
-
- Regs : RegRec; { Dos Registers }
- HalfRegs : halfregtype absolute regs;
- NamR : String20; { The file name from the DTA }
- DTA : array [ 1..43 ] of Byte; { Back from DOS }
- Mask : array [ 1..DirStringLength ] of Char;
- { What do we read DOS calls }
- MaskArray : Array [ 1..DirStringLengthMore ] of Char;
- { The file name }
- Error : integer; { Error code from Dos - Not used in }
- { coding, this was a testing field }
- VolumeIDWrite : string[16]; { The disk Volume-id }
- VolumeIDRead : string[16];
-
-
- { Printer Areas }
-
- ColumnWork, { Work area for print columns }
- Column : string82; { The slip sheet line for big dirs }
- Column3 : string[88]; { The slip sheet line for big dirs }
- Column1, { The slip sheet line for small dirs }
- Column2 : string42; { The second column for the slip sheet }
- ExternalMessage : string[50]; { What is printed on the slip sheet }
- PrintLines, { Number of lines printed not }
- { counting dashes }
- SlipSheetLines, { Number of lines on a slip sheet }
- PrintPages, { Number of Slip sheets on a page }
- PrintColumn : integer; { Number of column being printed }
- heading, { The heading line }
- blankline, { The side lines }
- Dashes : string[88]; { What prints at top of form }
- FoldLine : string[88]; { The fold line on a long slip sheet }
- PrintOption : Boolean; { Do we create the print report }
-
- { Misc Areas }
-
- timestr : string[11]; { like it says }
- datestr : string[15]; { " }
- Option : Char;
- DirectoryChanged : string[1]; { Did we just change a directory }
- I, { used for loops }
- A, B, C, { " }
- NumberRecs, { How many records on disk }
- FileYear, { File Year actual not just since 1980 }
- FileWork, { Work area }
- FileWork2 : integer; { Work area }
- FileWork3 : real; { Work area for file size }
- NewDir, { Work areas in directory name }
- NewDirWork : string[DirStringLengthMore]; { and file name manipulation }
- FileOption, { Do you want a dir file instead of }
- { a slip sheet }
- DirOption, { Do you only want to use 1 directory }
- DirOptionContinued : Boolean; { Is this the second or more dir }
- { when you are processing by dirs }
- { DirectoryWanted : string[DirStringLength]; } { only do each dir }
-
- (*****************************************************************************
- This is the beginning of the program code.
- *****************************************************************************)
- {$IWindo.Inc}
- {$IDISKARC.INC}
- {$IDISKLBR.INC}
- {----------------------------------------------------------------------------}
- { This routine get the DOS date and makes it look good }
-
- procedure date; { What is todays date }
- const
- montharr : array [1..12] of string[3] =
- ('Jan','Feb','Mar','Apr','May',
- 'Jun','Jul','Aug','Sep','Oct','Nov','Dec');
-
- var
- regs:regrec;
- month, day:string[2];
- year:string[4];
- dx, cx, result, tmpmonth:integer;
-
- begin
- with regs do
- begin
- ax:= $2a shl 8;
- end;
- msdos (regs);
- with regs do
- begin
- str(cx:4, year);
- str(dx shr 8:2, month);
- str(dx mod 256:2, day);
- end;
- if month[1] = ' ' then month[1] := '0';
- val (month, tmpmonth, result);
- datestr:= day + '-' + montharr[tmpmonth] + '-' + year
- end; { procedure date }
-
-
- { This routine gets the DOS time and makes it look good }
-
- procedure time; { What is the current time }
- var { Not on your watch! in the computer }
- regs:regrec;
- ah, al, ch, cl, dh:byte;
- hour, min, sec, ampm:string[2];
- tmptime, result:integer;
-
- begin
- ah := $2c;
- with regs do
- begin
- ax := ah shl 8 + al;
- end;
- intr($21,regs);
- with regs do
- begin
- str(cx shr 8:2, hour);
- str(cx mod 256:2, min);
- str(dx shr 8:2, sec);
- end;
- if (hour > '11') then
- ampm := 'pm'
- else
- ampm := 'am';
- if (hour < ' 1') then
- begin
- ampm := 'am';
- hour := '12';
- end;
- if (hour > '12') then
- begin
- val (hour, tmptime, result);
- tmptime:= tmptime - 12;
- str (tmptime:2, hour);
- end;
- if (min[1] = ' ') then
- min[1]:= '0';
- if (sec[1] = ' ') then
- sec[1]:= '0';
- timestr := hour + ':' + min + ':' + sec + ' ' + ampm;
- end; { procedure time }
-
-
- { This routine sets up the Data Transfer Area (DTA) for DOS }
-
- procedure SetUpDTA;
- begin
- Regs.AX := $1A00; { Function used to set the DTA }
- Regs.DS := Seg(DTA); { store the parameter segment in DS }
- Regs.DX := Ofs(DTA); { " " " offset in DX }
- MSDos(Regs); { Set DTA location }
- Error := Regs.AX and $FF;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine reads the volume id in a directory }
- {--- Written by Karson W Morrison Caleb Computing Center ---}
-
- procedure ReadVolume;
- var i,a : integer;
- begin
- VolumeIDWrite := DriveWanted + ':\????????.???' + chr(0);
- for i := 1 to length(VolumeIDWrite) do
- Mask[i] := VolumeIDWrite[i];
- VolumeIDRead := ' ';
- Regs.AX := $4E00; { Get first directory entry }
- Regs.DS := Seg(Mask); { Point to the file Mask }
- Regs.DX := Ofs(Mask);
- Regs.CX := $0008; { Store the option for Volume label }
- MSDos(Regs); { Execute MSDos call }
- Error := Regs.AX and $FF; { Get Error return }
- a := 0;
- if error = 0 then
- for i := 1 to 12 do
- if i <> 9 then
- begin
- a := a + 1;
- VolumeIDRead[a] := Chr(Mem[Seg(DTA):Ofs(DTA)+29+i]);
- end;
- for i := 1 to 12 do
- if VolumeIDRead[i] = Chr(0) then
- VolumeIDRead[i] := ' ';
- end;
-
- {----------------------------------------------------------------------------}
- { This routine writes the volume id in a directory }
- {--- Written by Karson W Morrison Caleb Computing Center ---}
- procedure WriteVolume;
- var i,a : integer;
- begin
- VolumeIDWrite := DriveWanted + ':' + VolumeIDWrite + chr(0);
- a := 0;
- for i := 1 to length(VolumeIDWrite) do
- if i <> 11 then
- begin
- a := a + 1;
- Mask[a] := VolumeIDWrite[i];
- end
- else
- begin
- a := a + 1;
- Mask[a] := '.';
- a := a + 1;
- Mask[a] := VolumeIDWrite[i];
- end;
- Regs.AX := $3C00; { Create a file }
- Regs.DS := Seg(Mask); { Point to the file Mask }
- Regs.DX := Ofs(Mask);
- Regs.CX := $0008; { Store the option for Volume label }
- MSDos(Regs); { Execute MSDos call }
- Regs.BX := Regs.AX; { Put file handle in BX }
- Regs.AX := $3E00; { Close the file }
- MSDos(Regs); { Execute MSDos call }
- Error := Regs.AX and $FF; { Get Error return }
- end;
-
-
- { This routine reads the first record in a directory }
-
- procedure ReadFirst;
- begin
- Regs.AX := $4E00; { Get first directory entry }
- Regs.DS := Seg(Mask); { Point to the file Mask }
- Regs.DX := Ofs(Mask);
- Regs.CX := 23; { Store the option }
- MSDos(Regs); { Execute MSDos call }
- Error := Regs.Flags and $01;
- end;
-
-
- { This routine reads all following records in a directory }
-
- procedure ReadNext;
- begin
- Error := 0;
- Regs.AX := $4F00; { Function used to get the next }
- { directory entry }
- Regs.CX := 23; { Set the file option }
- MSDos(Regs); { Call MSDos }
- Error := Regs.AX or (Regs.Flags and $01) and $FF; { get the Error return }
- end;
-
-
- { This routine gets the name string from the directory }
- { VIA the DTA. }
-
- procedure SetUpNamR; { Get the file name from the directory }
- begin
- repeat
- NamR[I] := Chr(Mem[Seg(DTA):Ofs(DTA)+29+I]);
- I := I + 1;
- until not (NamR[I-1] in [' '..#$7F]) or (I>20); { Note: The second item }
- { being compared as in [' '..#$7F] is }
- { the 7Fh char DEL }
-
- NamR[0] := Chr(I-1); { set string length because assigning }
- { by element does not set length }
- end;
-
-
- { This routine gets the new directory name from the table }
- { that was built as we were reading the parent directory }
- { it is for this reason that the children directories are }
- { not built on the floppy imediately following the parent }
- { directories. All parent directories are saved followed }
- { by all level 2 subdirectories, followed by the third level }
- { Etc. }
- {----------------------------------------------------------------------------}
-
- procedure Set_Up_Dir_Chg; { Get a new directory from the table }
- begin
- E_Use := E_Use + 1;
- Buffer := DirTable[E_use] + '\????????.???' + Chr( 0);
- Buffer1 := DirTable[E_use];
- GoToXY(25,18); ClrEol;
- Write(Buffer1);
- NewDir := DirTable[E_use] + Chr(0);
- NewDir[1] := WriteDrive[1]; { overlay the read drive with the write }
- NewDirWork := NewDir; { this will be used to set up new directories }
- { on a floppy if it changes floppies. }
- if length(Buffer1) = 1 then Buffer1 := '';
- for I := 1 to length(Buffer) do
- Mask[I] := Buffer[I];
- DirectoryChanged := '1';
- end;
-
- {----------------------------------------------------------------------------}
- { This routine gets the Date from the DTA for the file }
-
- procedure FindDate; { Translate the Date from the Disk to }
- begin { Something readable }
- FileMO := ' '; { yyyyyyymmmmddddd in bits}
- FileDA := ' ';
- FileDateDos := MemW[Seg(DTA):Ofs(DTA)+24];
- FileYear := FileDateDos shr 9; { drop off the last 9 positions }
- Str((FileYear + 80),FileYR); { years are added to base year of 1980 }
- FileWork := FileDateDos shl 7; { drop off the first 7 positions }
- Str((FileWork shr 12),FileMO); { now move it back to the right }
- FileWork := FileDateDos shl 11; { drop off the left 11 positions }
- Str((FileWork shr 11),FileDA); { now move back to the right }
- FileMO[0] := Chr(2);
- FileDA[0] := Chr(2);
- if FileDA[2] = ' ' then
- begin
- FileDA[2] := FileDA[1];
- FileDA[1] := '0';
- end;
- if FileMO[2] = ' ' then
- begin
- FileMO[2] := FileMO[1];
- FileMO[1] := '0';
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine gets the time from the DTA for the file }
-
- procedure FindTime; { Get the time and put it in a format that }
- begin { we can use. The Dos Format in bits is }
- FileHR := ' '; { hhhhhmmmmmmsssss }
- FileMN := ' ';
- FileHourDos := MemW[Seg(DTA):Ofs(DTA)+22];
- Str((FileHourDos shr 11),FileHR); { Shift it around so the minutes and }
- FileWork := FileHourDos shl 5; { seconds disappear }
- Str((FileWork shr 10),FileMN);
- FileHR[0] := Chr(2);
- FileMN[0] := Chr(2);
- if FileHR[2] = ' ' then
- begin
- FileHR[2] := FileHR[1];
- FileHR[1] := '0';
- end;
- if FileMN[2] = ' ' then
- begin
- FileMN[2] := FileMN[1];
- FileMN[1] := '0';
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine gets the file size from the DTA }
-
- procedure FindSize; { Get the file size and format it so we can }
- begin { use it }
- FileWork := MemW[Seg(DTA):Ofs(DTA)+26]; { Get from DTA, Low byte of size }
- FileSiLow := FileWork; { Save Low byte size }
- FileWork2 := FileWork shr 15; { Is the High bit on }
- FileWork3 := FileWork2 * 32768.0; { yes! Save the size }
- FileWork2 := FileWork shl 1; { Get rid of high bit }
- FileWork := FileWork2 shr 1; { Now back to where we were }
- FileWork3 := FileWork3 + FileWork; { Lets add them together }
- FileWork := MemW[Seg(DTA):Ofs(DTA)+28]; { Get from DTA, High byte }
- FileSiHigh := FileWork; { Save High byte size }
- FileSiz := FileWork3 + (FileWork * 65536.0); { Make size total }
- end;
-
- {----------------------------------------------------------------------------}
- { This routine looks at the DTA to find the byte that }
- { carries the attribute bytes with the indicator that }
- { shows what is a directory. This routine also get the }
- { System, Hidden and read only attribute }
-
- procedure PrintDTA;
- var
- FileAttr : Byte;
- begin
- FileHidden := false;
- FileRead := false;
- FileSystem := false;
- GoodFileName := true;
- FileAttr := Byte(Mem[Seg(DTA):Ofs(DTA)+21]);
- if FileAttr > 31 then { File Not Archived }
- begin
- FileAttr := FileAttr - 32;
- end;
- if FileAttr > 15 then { This is a directory entry }
- begin { Let's do it to it }
- GoodFileName := false;
- E := E + 1; { Save the name in the table }
- Buffer2 := Buffer1;
- A := Length(Buffer2) + 1;
- B := Length(NamR);
- C := 1;
- Buffer2[A] := '\';
- repeat
- A := A + 1;
- Buffer2[A] := NamR[C];
- C := C + 1;
- until C > B;
- if A > 49 then { Dos has a maxinum of 63, this is to allow file name }
- begin
- Writeln;
- ClrEol;
- Writeln('This program has encountered a directory string greater than');
- ClrEol;
- Writeln('DOS allowed. Dos only allows a concatinated string length of');
- ClrEol;
- Writeln('63 positions.');
- ClrEol;
- Halt;
- end;
- Buffer2[0] := Chr(A - 1);
- DirTable[ E ] := Buffer2;
- end;
- if FileAttr > 7 then { Volume Label }
- FileAttr := FileAttr - 8;
- if FileAttr > 3 then { System File }
- begin
- FileAttr := FileAttr - 4;
- FileSystem := true;
- end;
- if FileAttr > 1 then { Hidden File }
- begin
- FileAttr := FileAttr - 2;
- FileHidden := true;
- end;
- if FileAttr > 0 then { Read Only }
- begin
- FileAttr := FileAttr - 1;
- FileRead := true;
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine gets the current default drive }
- { If the option is to create the print file on }
- { disk then the input drive for the program to read }
- { cannot be the default drive, because the file DIR.DIR }
- { will be created on the default drive. }
-
- procedure GetCurrentDrive;
- begin
- Regs.AX := $1900;
- MSDos(Regs);
- DefaultDrive := Char(HalfRegs.Al + 65) + ':'; { HalfRegs.Al has $00 for }
- Error := Regs.Flags and $01; { drive A, $01 for B, etc. }
- end;
-
- {----------------------------------------------------------------------------}
- { the following routines were taken from a Borland Package in their database }
- { toolbox, and have been modified by the author }
-
- function ConstStr(C : Char; N : Integer) : Str80;
- var
- S : string[80];
- begin
- if N < 0 then
- N := 0;
- S[0] := Chr(N);
- FillChar(S[1],N,C);
- ConstStr := S;
- end;
-
- (* Beep sounds the terminal bell or beeper *)
-
- procedure Beep;
- begin
- Write(^G);
- end;
-
- procedure InputStr(var S : AnyStr;
- L,X,Y : Integer;
- Term : CharSet;
- var TC : Char );
- const
- UnderScore = '_';
- var
- P : Integer;
- Ch : Char;
- Snd : Char;
- begin
- GotoXY(X,Y); Write(S,ConstStr(UnderScore,L - Length(S)));
- P := 0;
- repeat
- GotoXY(X + P,Y); Read(Kbd,Ch);
- case Ch of
- #27 : begin
- Read(Kbd,Snd);
- case Snd of
- #61 : begin
- S := PrevLine;
- P := Length(S);
- GotoXY(X,Y); Write(S,ConstStr(UnderScore,L - Length(S)));
- end;
- 'K' : if P > 0 then P := P -1
- else Beep;
- 'M' : if P < length(S) then P := P + 1
- else Beep;
- 'G' : P := 0;
- 'O' : P := length(S);
- 'S' : if P < length(S) then
- begin
- Delete(S,P+1,1);
- Write(Copy(S,P+1,L),UnderScore);
- end
- else Beep;
- else Beep;
- end; { of case }
- end;
- #32..#126 : if P < L then
- begin
- if Length(S) = L then
- Delete(S,L,1);
- P := P + 1;
- Insert(Ch,S,P);
- Write(Copy(S,P,L));
- end
- else Beep;
- ^S : if P > 0 then
- P := P - 1
- else Beep;
- ^D : if P < Length(S) then
- P := P + 1
- else Beep;
- ^A : P := 0;
- ^F : P := Length(S);
- ^G : if P < Length(S) then
- begin
- Delete(S,P + 1,1);
- Write(Copy(S,P + 1,L),UnderScore);
- end;
- ^H,#127 : if P > 0 then
- begin
- Delete(S,P,1);
- Write(^H,Copy(S,P,L),UnderScore);
- P := P - 1;
- end
- else Beep;
- ^Y : begin
- Write(ConstStr(UnderScore,Length(S) - P));
- Delete(S,P + 1,L);
- end;
- else
- if not (Ch in Term) then Beep;
- end; {of case}
- until Ch in Term;
- P := Length(S);
- PrevLine := S;
- GotoXY(X + P,Y);
- Write('' :L - P);
- TC := Ch;
- end;
- { End of the routines modified from the Borland's package }
- {----------------------------------------------------------------------------}
- { This routine prints a slip sheet that will go into the diskette }
- { envelope. The routine uses the lo and hi }
- { subscripts and prints all file names in between. }
-
- Procedure PrintLabel(PrintList : SortArray; lo, hi : integer);
- const
- Term : CharSet = [^M,^Z];
- var
- SRNStop : integer;
- SRNHold : integer;
- SRN2ndHalf : integer;
- I : integer;
- TC : char;
- begin
- if PrintLines = 0 then
- begin
- GoToXY(5,22); Write('Type "F3" to return previous label');
- GoToXY(1,19); Writeln('What external label do you want on the Cover?');
- ExternalMessage := '';
- repeat
- InputStr(ExternalMessage,50,1,20,Term,TC);
- until TC in Term;
- for I := Length(ExternalMessage) + 1 to 50 do
- ExternalMessage[I] := ' ';
- ExternalMessage[0] := chr(50);
- Writeln(FilVar,dashes);
- Writeln(FilVar,blankline);
- Writeln(FilVar,'| ',ExternalMessage,' Free: ',FreeAreaOnDisk:7:0,' ',DateStr,' |');
- Column2 := ' ';
- Write(FilVar,'| Volume-ID: ',VolumeIDRead,' ');
- Writeln(FilVar,' ',TimeStr,' |');
- PrintLines := 4;
- SlipSheetLines := 4;
- PrintColumn := 1;
- end;
- if HoldDir <> '01' then
- begin
- Val(HoldDir,HoldDirNum,status);
- Column1 := ' ';
- HoldDirName := DirTable[HoldDirNum];
- Delete(HoldDirName,1,2); { delete the first 2 character }
- Column1 := HoldDirName; { it's the drive and : }
- HoldDirName := HoldDirName +'\'; { set up for *.ARC processing }
- HoldDirNameSave := HoldDirName; { set up for *.LBR processing }
- Column1[length(Column1)+1] := ' ';
- Column1[length(Column1)+2] := ' ';
- Column1[0] := chr(40);
- Column3 := '| Directory ' + Column1 + ' |';
- Writeln(FilVar,blankline);
- Writeln(FilVar,Column3);
- Writeln(FilVar,blankline);
- PrintLines := PrintLines + 3;
- SlipSheetLines := SlipSheetLines + 3;
- end
- else
- HoldDirName := '';
- SRN2ndHalf := (hi -((hi - lo) div 2) + 1); { 2nd half starts at 1 past }
- if odd((hi + 1) - lo) then { the mid point }
- begin { if the total entries is }
- SRNStop := SRN2ndHalf - 1; { odd then then I need to }
- SRN2ndHalf := SRN2ndHalf - 1; { start 1 higher than the }
- end { mid point }
- else
- begin
- SRNStop := SRN2ndHalf - 2;
- SRN2ndHalf := SRN2ndHalf - 2;
- end;
- for I := lo to SRNStop do { from bottom to mid point }
- begin
- SlipSheetLines := SlipSheetLines + 1;
- if SlipSheetLines > 40 then
- begin
- Writeln(FilVar,FoldLine);
- SlipSheetLines := 2; { its 2 because the its one }
- PrintLines := PrintLines + 1; { higher than has been printed }
- end;
- SRN2ndHalf := SRN2ndHalf + 1;
- Column1 := ' ';
- ColumnWork := PrintList[I];
- Delete(ColumnWork,1,2);
- ColumnWork[0] := chr(length(PrintList[I])-2);
- Column1 := ColumnWork; { remove the chr(0) at end }
- Column1[0] := Chr(40); { Make it a length of 40 }
- Column2 := ' ';
- if SRN2ndHalf <= hi then { If I have already hit the }
- begin { end of the right side }
- ColumnWork := PrintList[SRN2ndHalf]; { don't go any further }
- Delete(ColumnWork,1,2);
- ColumnWork[0] := chr(length(PrintList[SRN2ndHalf])-2);
- Column2 := ColumnWork; { remove the chr(0) at end }
- Column2[0] := Chr(40); { Make it a length of 40 }
- end;
- Writeln(FilVar,'| ',Column1,' ',Column2,' |'); { Write the line }
- PrintLines := PrintLines + 1;
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine prints the header for the ARC files on the cover }
-
- Procedure PrintArcHeader;
- begin
- Column1 := ' ';
- Column1 := ArcName;
- Delete(Column1,1,2); { delete the first 2 character }
- Column1[length(Column1)+1] := ' ';
- Column1[length(Column1)+2] := ' ';
- Column1[0] := chr(40); { it's the drive: }
- Column3 := '| Arc File ' + Column1 + ' |';
- Writeln(FilVar,blankline);
- Writeln(FilVar,Column3);
- PrintLines := PrintLines + 2;
- SlipSheetLines := SlipSheetLines + 2;
- end;
- {----------------------------------------------------------------------------}
- { This routine prints the files that are included in the *.ARC file }
- { The routine scans the sorted files list looking for `.ARC' if I find it }
- { I then procede to print the file, size, and date for all entries in the }
- { ARC file }
-
- Procedure PrintArc(lo, hi : integer);
- var
- SRNStop : integer;
- SRNHold : integer;
- SRN2ndHalf : integer;
- I : integer;
- hdr : heads;
- begin
- MaxArcEntries := False;
- for i := lo to hi do
- begin
- if Pos('.ARC',SortList[i]) <> 0 then
- begin
- ArcName := copy(SortList[i],3,(Pos('.ARC',SortList[i])+2));
- ArcName := ReadDrive + HoldDirName + ArcName;
- OpenArc;
- if arcopen then
- begin
- ArcSrn := 0;
- while readhdr(hdr) do
- begin
- if ArcSrn < Max_Arc_Table_Entries then
- ArcSrn := ArcSrn + 1
- else
- begin
- if MaxArcEntries then
- else
- begin
- GoToXY(1,20);
- Write('The Maximum number of entries have been reached for the Arc Core Table');
- MaxArcEntries := True;
- end;
- end;
- lstfile(hdr);
- fseek(long_to_real(hdr.size));
- end;
- fclose;
- PrintArcHeader;
- HoldDirSave := HoldDir;
- HoldDir := '01';
- PrintLabel(ArcList,1,ArcSrn);
- HoldDir := HoldDirSave;
- end;
- end;
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine prints the cover heading for the *.LBR file }
-
- Procedure PrintLbrHeader;
- begin
- Column1 := ' ';
- Column1 := ArcName;
- Delete(Column1,1,2); { delete the first 2 character }
- Column1[length(Column1)+1] := ' ';
- Column1[length(Column1)+2] := ' ';
- Column1[0] := chr(40); { it's the drive: }
- Column3 := '| Lbr File ' + Column1 + ' |';
- Writeln(FilVar,blankline);
- Writeln(FilVar,Column3);
- PrintLines := PrintLines + 2;
- SlipSheetLines := SlipSheetLines + 2;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine prints the file names in the *.LBR file }
- { it scans the sorted table array for a file with '.LBR' if found }
- { I print the data. See the comments in the DISKLBR.INC file and under the }
- { main comments in this program for *.LBR file differences. }
-
- Procedure PrintLbr(lo, hi : integer);
- var
- SRNStop : integer;
- SRNHold : integer;
- SRN2ndHalf : integer;
- I : integer;
- hdr : heads;
- begin
- for i := lo to hi do
- begin
- MaxArcEntries := False;
- if Pos('.LBR',SortList[i]) <> 0 then
- begin
- HoldDirName := HoldDirNameSave;
- ArcName := copy(SortList[i],3,(Pos('.LBR',SortList[i])+2));
- ArcName := ReadDrive + HoldDirName + ArcName;
- OpenLbr;
- if lbropen then
- begin
- ArcSrn := 0;
- while readlbrhdr do
- begin
- if ArcSrn < Max_Arc_Table_Entries then
- ArcSrn := ArcSrn + 1
- else
- begin
- if MaxArcEntries then
- else
- begin
- GoToXY(1,20);
- Write('The Maximum number of entries have been reached for the Arc Core Table');
- MaxArcEntries := True;
- end;
- end;
- lstlbrfile;
- LbrFilePosition := LbrFilePosition + 32;
- end;
- closelbr;
- PrintLbrHeader;
- HoldDirSave := HoldDir;
- HoldDir := '01';
- PrintLabel(ArcList,1,ArcSrn);
- HoldDir := HoldDirSave;
- end;
- end;
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine Finishes the slip sheet when a floppy is changed }
- { If there are more files than will fit on the slip sheet I just }
- { keep it going even though it may be longer than 5 inches, I }
- { didn't want to create 2 sheets of paper that may get lost. I }
- { would rather have just one long sheet. }
-
- Procedure CompSlipSheet;
- begin
- if PrintOption or FileOption then
- begin
- if PrintColumn = 2 then
- begin
- PrintColumn := 1;
- Column2 := ' ';
- Writeln(FilVar,'| ',Column1,' ',Column2,' |');
- PrintLines := PrintLines + 1;
- end;
- repeat
- Writeln(FilVar,blankline);
- PrintLines := PrintLines + 1;
- until PrintLines > 39;
- Writeln(FilVar,dashes);
- if (PrintPages = 2) or (PrintLines > 43) then { if I've printed more than }
- begin { 43 lines go to a new page }
- PrintPages := 1;
- Write(FilVar,Top_Of_Form); { new page }
- end
- else
- PrintPages := 2;
- PrintLines := 0;
- end;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine does a DOS call to determine the free space left }
- { on the drive. In Regs.DX you use a numeric representation of }
- { the drive you are using. 0 (zero) = default, 1 = A:, 2 = B: etc }
- { In the beginning of the MAIN routine I set up the field to be }
- { used in this routine. }
-
- Procedure HowMuchSpaceLeft;
- begin
- Regs.AX := $3600; { Function used to get free disk space }
- Regs.DX := NumericDriveHold;
- MSDos(Regs);
- FreeAreaOnDisk := Regs.AX; { Sectors per cluster }
- RealWork := Regs.CX; { Bytes per sector }
- FreeAreaOnDisk :=FreeAreaOnDisk * RealWork;
- TotalAreaOnDisk := FreeAreaOnDisk;
- RealWork := Regs.BX; { Number of available clusters }
- FreeAreaOnDisk :=FreeAreaOnDisk * RealWork;
- RealWork := Regs.DX; { Total number of clusters }
- TotalAReaOnDisk := TotalAreaOnDisk * RealWork;
- end;
-
- {----------------------------------------------------------------------------}
- { This routine clears lines 19 thru 22 }
-
- Procedure Clear_19_22;
- begin
- GoToXY(1,22); ClrEol;
- GoToXY(1,21); ClrEol;
- GoToxy(1,20); ClrEol;
- GoToXY(1,19); ClrEol;
- end;
-
- {----------------------------------------------------------------------------}
- procedure FindFileToPrint; { Yep that is what it is }
-
- begin
- if SRN < Max_Table_Entries then
- SRN := SRN + 1
- else
- begin
- if MaxEntries then
- else
- begin
- GoToXY(1,20);
- Write('The Maximum number of entries have been reached for the Core Table');
- MaxEntries := True;
- end;
- end;
- FileNme := ' '; { Blank it out }
- FileNme := NamR; { Get file name }
- FileNme[length(fileNme)] := ' '; { blank out chr(0) at end }
- FileNme[0] := Chr(13);
- Str(E_Use,FileDir); { Get Directory its in }
- if length(FileDir) = 1 then
- FileDir := '0' + FileDir;
- FindDate; { Make date readable }
- FindTime; { Time also }
- FindSize; { File size }
- FileAttributes := ' ';
- if FileSystem then
- FileAttributes[1] := 's'; { system }
- if FileHidden then
- FileAttributes[2] := 'h'; { hidden }
- if FileRead then
- FileAttributes[3] := 'r'; { read only }
- Str(FileSiz:6:0,FileSizeString);
- SortList[SRN] := FileDir + FileNme + FileMO + '-' + FileDA + '-' +
- FileYR + ' ' + FileHR + ':' + FileMN + ' ' + FileSizeString +
- ' ' + FileAttributes;
- end;
-
- {----------------------------------------------------------------------------}
- (* This routine is the one that starts the ball rolling.
- It Reads the DTA data and extracts the file names or directory
- entries from it. If it is a directory it updates the table
- that is maintained in 'read' order and when you get to all files
- in that directory it then goes up the table one entry to start
- reading that directory.
- {----------------------------------------------------------------------------}
- *)
- procedure StartItGoing;
- const
- Term : CharSet = [^M,^Z];
- var
- TC : char;
- begin
- if not DirOptionContinued then { Am I on my second directory }
- begin
- Write(FilVar,Condenced_Print); { Condenced line spacing }
- Write(FilVar,Line_Spacing); { 1/8 inch line spacing }
- DirOptionContinued := True;
- end;
- NotDir := True;
- SRN := 0;
- MaxEntries := False;
- E := 1; E_Use := 0;
- Buffer := ReadDrive;
- Buffer1 := ''; Buffer2 := Buffer; DirTable[E] := Buffer;
- FillChar(DTA,SizeOf(DTA),0); { Initialize the DTA buffer }
- FillChar(Mask,SizeOf(Mask),0); { Initialize the mask }
- FillChar(NamR,SizeOf(NamR),0); { Initialize the file name }
- SetUpDTA;
- { following instruction added version 1.12 }
- ReadVolume;
- if (VolumeIDRead = ' ') and (VolumeIDWanted in ['y', 'Y'])
- then
- begin
- MkWin(23,13,57,16,2,14,1);
- Writeln(' What Volume ID do you want?');
- VolumeIDWrite := '';
- repeat
- InputStr(VolumeIDWrite,11,12,2,Term,TC);
- until TC in Term;
- RmWin;
- WriteVolume;
- ReadVolume;
- end;
- Error := 0;
- While E_Use < E do
- begin
- Set_Up_Dir_Chg;
- ReadFirst; { This does the first read for a directory }
- if (Error = 0) then
- begin
- I := 1; { initialize 'I' to the first element }
- SetUpNamR; { this gets the first name from the directory }
- if NamR[1] = '.' then NotDir := False;
- if NotDir and (Error = 0) then
- begin
- PrintDTA; { This gets the file attributes }
- NumberRecs := NumberRecs + 1;
- if GoodFileName then
- FindFileToPrint; { Build the record }
- end;
- end;
- while (Error = 0) do begin
- NotDir := True;
- ReadNext; { This reads other entries in directory but }
- if (Error = 0) then { the first }
- begin
- I := 1;
- SetUpNamR;
- if NamR[1] = '.' then NotDir := False; { Is it a dot directory }
- if NotDir and (Error = 0) then { No it is not }
- begin
- PrintDTA;
- NumberRecs := NumberRecs + 1;
- if GoodFileName then
- FindFileToPrint; { Build the record and go dupe it }
- end;
- end;
- end;
- end;
- Writeln; { All done reading the directories }
- end; { End of procedure }
-
- {----------------------------------------------------------------------------}
- {$IQUIKSORT.INC}
- {----------------------------------------------------------------------------}
- Procedure SetUpNumericDrive;
- begin
- { The following routines set the fields for the initial values }
- { If you have a drive which goes higher than this you need to }
- { add it. }
-
- NumericDriveHold := (Ord(DriveWanted[1]) - Ord('A') + 1);
- end;
-
- {----------------------------------------------------------------------------}
- { This reads the directories, Sorts the data, and then Prints it }
-
- Procedure LetsDoIt;
- begin
- Clear_19_22;
- Write('Reading the Directories');
- StartItGoing;
- Sort_List(SortList,1,SRN);
- HowMuchSpaceLeft; { Check for file space left on the disk here }
- Clear_19_22;
- SRNHold := 0;
- Column := SortList[1]; { Get Dir for First entry in table }
- HoldDir[1] := Column[1]; { Save it }
- HoldDir[2] := Column[2]; { Save it }
- HoldDir[0] := chr(2);
- HoldDirNameSave := ''; { Set up hold area to null }
- BegSub := 1; { Beginning sub = 1 }
- for I := 1 to SRN do { loop until all throught the table }
- begin
- Column := SortList[I];
- HoldDirComp := Column;
- if HoldDirComp <> HoldDir then { When the dir entry changes }
- begin
- PrintLabel(SortList,BegSub,I-1); { Print all entries in this dir }
- PrintArc(BegSub,I-1); { Print any arc files }
- PrintLbr(BegSub,I-1); { Print any Lbr files }
- BegSub := I; { set up for next directory }
- HoldDir := HoldDirComp; { set up for next compare }
- end;
- end;
- PrintLabel(SortList,BegSub,SRN); { Print all lines that match the last }
- { entry in the table }
- PrintArc(BegSub,SRN); { Print any arc files }
- PrintLbr(BegSub,SRN); { Print and LBR files }
- CompSlipSheet;
- Clear_19_22;
- end;
-
- {----------------------------------------------------------------------------}
- { You cannot have the file DIR.DIR on the default drive }
- { Therefore I check if your request is for the default }
- { drive }
-
- Procedure CheckValidDrive;
- begin
- if FirstTimeDrive = false then
- begin
- GetCurrentDrive;
- DefaultDrive[0] := Chr(1);
- FirstTimeDrive := true;
- end;
- if DriveWanted <> DefaultDrive then
- begin
- DriveOK := True;
- ReadDrive := DriveWanted + ':';
- end
- else
- DriveOK := False;
- end;
-
- {----------------------------------------------------------------------------}
- { This wants to know where the floppy drive is }
-
- Procedure AskForDrive;
- begin
- GoToXY(1,18); ClrEol;
- Writeln('What Drive do you want? ');
- Write (' Press * when complete. ');
- GoToXY(25,18);
- repeat
- read(Kbd,Option);
- until (Option in ['A'..'Z','a'..'z','*']);
- DriveWanted := Option;
- if DriveWanted <> '*' then
- begin
- GoToXY(25,18);
- DriveWanted := Upcase(DriveWanted);
- Write(DriveWanted);
- Clear_19_22;
- DriveWanted[0] := Chr(1);
- if fileoption then
- begin
- CheckValidDrive;
- end
- else
- begin
- DriveOK := true;
- ReadDrive := DriveWanted + ':';
- end;
- if not DriveOK then
- begin
- GoToXY(1,20);
- Writeln('You cannot create a print file on the disk you want a cover for!')
- end
- else
- SetUpNumericDrive;
- end;
- end;
-
-
- {----------------------------------------------------------------------------}
- {----------------------------------------------------------------------------}
- (* This is called the Main routine but only because Pascal calls
- it that. As you can see it sets up the screen heading and asks
- for the options that you want. You must get past this routine
- succesfully before you can get to the rest of the program.
-
- Therefore it must be the most important. *)
- {----------------------------------------------------------------------------}
- {----------------------------------------------------------------------------}
-
-
-
- begin { Main program }
-
- NumberRecs := 0; { Zero out Record Count }
- PrintLines := 0;
- Dashes := ' -------------------------------------------------------------------------------------- ';
- FoldLine := '|- - - - - - - - - - - - - - - - - - - Fold Line - - - - - - - - - - - - - - - - - - -|';
- { There should be 88 of them }
- blankline := ('| |');
- { There should be 86 of them }
- FirstTimeDrive := false;
- DriveOK := false;
- PrintOption := true; { Looks like we want the slip sheets }
- FileOption := false; { and we don't want a file instead }
- PrintPages := 0; { We are on the first slip sheet }
- SlipSheetLines := 0; { Set up the slip sheet lines also }
- Assign(FilVar,'Lst:'); { We set up for printer first }
- { then check for disk option }
- Time; { Get the time }
- Date; { Get the date }
- FirstTime := True; { First time here }
- DirOption := False; { We are not doing it only for 1 dir }
- DirOptionContinued := False; { This is not the second or more }
- { directory, Only used on dir option }
- PrevLine := ''; { blank out field }
- ClrScr;
-
- { Now it is time to set up the screen to tell you who did this wonderful }
- { thing and to allow you to give the options that will customize the }
- { program to only do what you want. Not what I want! }
-
- { Lets fill the screen with data }
-
- GoToXY(7,1);
- Write('Diskette Cover Program (DisKover) Version 1.17');
- GoToXY(55,1);
- Write(Datestr, ' ', timestr);
- GoToXY(10,3);
- Write('Written and Copyright (C) by');
- GoToXY(20,5);
- Write('Karson W. Morrison - Marty Morrison');
- GoToXY(29,6);
- Write('Caleb Computing Center'); { This is who did it }
- GoToXY(20,7);
- Write('Rd 1, Box 531, Ringoes New Jersey, 08551');
- GoToXY(20,8);
- Write('January 23, 1986 Numbers 13:30'); { And When }
- GoToXY(10,10);
- Write('OPTIONS:');
- GoToXY(11,11);
- Write('Create Diskette Cover for Floppies (Printer): (1)');
- GoToXY(11,12);
- Write('Create Diskette Cover Print File (DIR.DIR) : (2)');
- GoToXY(14,18);
- Write('Option: ');
- repeat
- read(Kbd,Option);
- GoToXY(22,18);
- Write(Upcase(Option));
- GoToXY(22,18);
-
- { If the Directory Option is requested then the Option is }
- { toggled on or off. The program default is ON. }
-
- until Option in [ '1', '2'];
- Writeln;
-
-
- { The following routines turn of or off the messages for the option }
- { requested }
-
- if Option = '1' then
- begin
- GoToXY(61,11);
- Write('ON ');
- GoToXY(22,18);
- end;
-
- if Option = '2' then
- begin
- PrintOption := false; { if you don't want paper }
- FileOption := true; { then I put it on disk }
- Assign(FilVar,'DIR.DIR');
- GoToXY(61,12);
- Write('ON ');
- GoToXY(22,18);
- end;
-
- Rewrite(FilVar); { Open the file for output }
-
- MkWin(15,13,65,17,2,14,1);
- Writeln(' Do you want to create Volume-IDs where missing?');
- Write(' (Y/N)?');
- repeat
- Read(Kbd,VolumeIDWanted);
- until VolumeIdWanted in ['Y', 'N', 'n', 'y'];
- RmWin;
-
- repeat
- AskForDrive;
- if (DriveOK) and (DriveWanted <> '*') then
- LetsDoIt; { Lets do it many times }
- until DriveWanted = '*'; { until you say no more }
-
- if PrintLines <> 0 then
- begin
- CompSlipSheet;
- Write(FilVar,Top_Of_Form); { new page }
- Write(FilVar,Reset_Printer); { reset printer }
- end
- else
- begin
- Write(FilVar,Top_Of_Form); { new page }
- Write(FilVar,Reset_Printer); { reset printer }
- end;
-
- Close(FilVar);
-
- Writeln; ClrEol;
- end.
- (* Well we are now here with the last end just ahead of us.
- It sure has been fun.
- As Roy Rogers used to sing "Happy Trails To You"
-
- Karson Morrison - Marty Morrison
- Caleb Computing Center
- " Yes we can " Numbers 13:30
- *)