Skip to content
This repository was archived by the owner on Apr 6, 2025. It is now read-only.

Commit ecaed54

Browse files
spring cleaning?
- Update and restructure TurboC++ files from original disks? - Update launch script, now includes basic checks.
1 parent 5d0fd56 commit ecaed54

File tree

389 files changed

+9598
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+9598
-432
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Swap files
2+
TC/**/*.SWP
3+
4+
# User's Projects
5+
TC/Projects/*

BIN/EX1.EXE

-22.7 KB
Binary file not shown.

BIN/TC.PIF

-995 Bytes
Binary file not shown.

BIN/TC0000.SWP

-256 KB
Binary file not shown.

BIN/TC0001.SWP

-256 KB
Binary file not shown.

BIN/TC0002.SWP

-256 KB
Binary file not shown.

BIN/TC0003.SWP

-256 KB
Binary file not shown.

BIN/TC0004.SWP

-256 KB
Binary file not shown.

BIN/TC0005.SWP

-256 KB
Binary file not shown.

BIN/TC0006.SWP

-256 KB
Binary file not shown.

BIN/TC0007.SWP

-256 KB
Binary file not shown.

BIN/TC0008.SWP

-256 KB
Binary file not shown.

BIN/TC0009.SWP

-256 KB
Binary file not shown.

BIN/TC0010.SWP

-256 KB
Binary file not shown.

BIN/TC0011.SWP

-256 KB
Binary file not shown.

BIN/TC0012.SWP

-256 KB
Binary file not shown.

BIN/TC0013.SWP

-256 KB
Binary file not shown.

BIN/TC0014.SWP

-256 KB
Binary file not shown.

BIN/TC0015.SWP

-256 KB
Binary file not shown.

BIN/TC0016.SWP

-256 KB
Binary file not shown.

BIN/TC0017.SWP

-256 KB
Binary file not shown.

BIN/TCDEF.DSK

-1.67 KB
Binary file not shown.

BIN/THELP.CFG

-1
This file was deleted.

BIN/UNZIP.EXE

-22.5 KB
Binary file not shown.

CLASSLIB/OBJS/DL/BIDSDBL.PRJ

-10.7 KB
Binary file not shown.

CLASSLIB/OBJS/DL/TCLASDBL.PRJ

-11.6 KB
Binary file not shown.

CLASSLIB/OBJS/DS/BIDSDBS.PRJ

-10.7 KB
Binary file not shown.

CLASSLIB/OBJS/DS/TCLASDBS.PRJ

-11.6 KB
Binary file not shown.

CLASSLIB/OBJS/L/BIDSL.PRJ

-10.7 KB
Binary file not shown.

CLASSLIB/OBJS/L/TCLASSL.PRJ

-11.6 KB
Binary file not shown.

CLASSLIB/OBJS/S/BIDSS.PRJ

-10.7 KB
Binary file not shown.

CLASSLIB/OBJS/S/TCLASSS.PRJ

-11.6 KB
Binary file not shown.

Projects/HELLO.C

-9
This file was deleted.

README.md

+2-4

SOURCE/1HELLO.EXE

-11.3 KB
Binary file not shown.

SOURCE/1HELLO.OBJ

-673 Bytes
Binary file not shown.

SOURCE/DIMND.EXE

-14.6 KB
Binary file not shown.

SOURCE/DIMND.OBJ

-1.09 KB
Binary file not shown.

SOURCE/HELLO.EXE

-11.3 KB
Binary file not shown.

SOURCE/HELLO.OBJ

-638 Bytes
Binary file not shown.

SOURCE/NONAME00.EXE

-11.3 KB
Binary file not shown.

SOURCE/NONAME00.OBJ

-742 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

TC/BGI/CHKLIST.MS

27 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1.21 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.
3.7 KB
Binary file not shown.

TC/BIN/TCDEF.DSK

201 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

TC/CLASSLIB/EXAMPLES/DIRECTRY.CPP

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#if !defined( __SORTARRY_H )
2+
#include <SortArry.h>
3+
#endif // __SORTARRY_H
4+
5+
#ifndef __DIR_H
6+
#include <dir.h>
7+
#define __DIR_H
8+
#endif
9+
10+
#ifndef __DIRECTRY_H
11+
#include "directry.h"
12+
#endif
13+
14+
#ifndef __FILEDATA_H
15+
#include "filedata.h"
16+
#endif
17+
18+
#if !defined( __IOSTREAM_H )
19+
#include <iostream.h>
20+
#endif // __IOSTREAM_H
21+
22+
Directory::Directory( char *pathName, sortOrder sortBy ) :
23+
SortedArray( 10, 0, 5 ), mask( pathName )
24+
{
25+
struct ffblk fileBlock;
26+
int morePathNames = !findfirst( mask, &fileBlock, 0 );
27+
while( morePathNames )
28+
{
29+
addFile( fileBlock, sortBy );
30+
morePathNames = !findnext( &fileBlock );
31+
}
32+
}
33+
34+
void Directory::addFile( ffblk& fileBlock, sortOrder sortBy )
35+
{
36+
switch( sortBy )
37+
{
38+
case byName:
39+
add( *(new FilesByName( fileBlock )) );
40+
break;
41+
case byDate:
42+
add( *(new FilesByDate( fileBlock )) );
43+
break;
44+
case bySize:
45+
add( *(new FilesBySize( fileBlock )) );
46+
break;
47+
}
48+
}
49+
50+
void Directory::printHeader( ostream& outputStream ) const
51+
{
52+
outputStream << "Directory: " << mask << "\n ";
53+
}
54+
55+
void Directory::printSeparator( ostream& outputStream ) const
56+
{
57+
outputStream << "\n ";
58+
}
59+
60+
void Directory::printTrailer( ostream& outputStream ) const
61+
{
62+
outputStream << "\n";
63+
}

TC/CLASSLIB/EXAMPLES/DIRECTRY.H

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#ifndef __DIRECTRY_H
2+
#define __DIRECTRY_H
3+
4+
#if !defined( __SORTARRY_H )
5+
#include <SortArry.h>
6+
#endif // __SORTARRY_H
7+
8+
#ifndef __DIR_H
9+
#include <dir.h>
10+
#endif
11+
12+
#ifndef __FILEDATA_H
13+
#include "filedata.h"
14+
#endif
15+
16+
const directoryClass = filesBySizeClass+1;
17+
18+
class Directory: public SortedArray
19+
{
20+
21+
public:
22+
23+
enum sortOrder { byName, byDate, bySize };
24+
25+
Directory( char *, sortOrder );
26+
virtual ~Directory() {}
27+
28+
virtual classType isA() const { return directoryClass; }
29+
virtual char *nameOf() const { return "Directory"; }
30+
virtual hashValueType hashValue() const { return 0; }
31+
virtual void printHeader( ostream& ) const;
32+
virtual void printSeparator( ostream& ) const;
33+
virtual void printTrailer( ostream& ) const;
34+
35+
private:
36+
37+
void addFile( ffblk&, sortOrder );
38+
String mask;
39+
40+
};
41+
42+
#endif

TC/CLASSLIB/EXAMPLES/DIRECTRY.PRJ

5.76 KB
Binary file not shown.

TC/CLASSLIB/EXAMPLES/FILEDATA.CPP

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#ifndef __IOSTREAM_H
2+
#include <iostream.h>
3+
#endif
4+
5+
#ifndef __IOMANIP_H
6+
#include <iomanip.h>
7+
#endif
8+
9+
#ifndef __DIR_H
10+
#include <dir.h>
11+
#define __DIR_H
12+
#endif
13+
14+
#ifndef __FILEDATA_H
15+
#include "filedata.h"
16+
#endif
17+
18+
FileData::FileData( ffblk& blk ) :
19+
fileName( blk.ff_name ),
20+
fileDate( (blk.ff_fdate >> 5) & 0x000F,
21+
blk.ff_fdate & 0x0001F,
22+
(blk.ff_fdate >> 9) + 1980 ),
23+
fileSize( blk.ff_fsize ),
24+
fileTime( blk.ff_ftime >> 11,
25+
(blk.ff_ftime >> 5) & 0x3F,
26+
blk.ff_ftime & 0x1F )
27+
{
28+
}
29+
30+
void FileData::printOn( ostream& outputStream ) const
31+
{
32+
outputStream << setw( 14 ) << setiosflags( ios::left ) << fileName
33+
<< setw( 18 ) << fileDate
34+
<< setw( 17 ) << resetiosflags( ios::left ) << fileTime
35+
<< setw( 10 ) << fileSize << " bytes";
36+
}
37+
38+
int FilesByName::isEqual( const Object& testFile ) const
39+
{
40+
return fileName == ( (FilesByName&)testFile ).fileName;
41+
}
42+
43+
int FilesByName::isLessThan( const Object& testFile ) const
44+
{
45+
return fileName < ( (FilesByName&)testFile ).fileName;
46+
}
47+
48+
int FilesByDate::isEqual( const Object& testFile ) const
49+
{
50+
return fileDate == ( (FilesByDate&)testFile ).fileDate &&
51+
fileTime == ( (FilesByDate&)testFile ).fileTime;
52+
}
53+
54+
int FilesByDate::isLessThan( const Object& testFile ) const
55+
{
56+
if( fileDate == ( (FilesByDate&)testFile ).fileDate )
57+
return fileTime < ( (FilesByDate&)testFile ).fileTime;
58+
else
59+
return fileDate < ( (FilesByDate&)testFile ).fileDate;
60+
}
61+
62+
int FilesBySize::isEqual( const Object& testFile ) const
63+
{
64+
return fileSize == ( (FilesBySize&)testFile ).fileSize;
65+
}
66+
67+
int FilesBySize::isLessThan( const Object& testFile ) const
68+
{
69+
return fileSize < ( (FilesBySize&)testFile ).fileSize;
70+
}

TC/CLASSLIB/EXAMPLES/FILEDATA.H

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#ifndef __FILEDATA_H
2+
#define __FILEDATA_H
3+
4+
#if !defined( __SORTABLE_H )
5+
#include <Sortable.h>
6+
#endif // __SORTABLE_H
7+
8+
#if !defined( __STRNG_H )
9+
#include <Strng.h>
10+
#endif // __STRNG_H
11+
12+
#if !defined( __LDATE_H )
13+
#include <LDate.h>
14+
#endif // __LDATE_H
15+
16+
#if !defined( __LTIME_H )
17+
#include <LTime.h>
18+
#endif // __LTIME_H
19+
20+
#ifndef __DIR_H
21+
#include <dir.h>
22+
#endif
23+
24+
const fileDataClass = __firstUserClass;
25+
const filesByNameClass = fileDataClass+1;
26+
const filesByDateClass = filesByNameClass+1;
27+
const filesBySizeClass = filesByDateClass+1;
28+
29+
class FileData: public Sortable
30+
{
31+
32+
public:
33+
34+
FileData( ffblk& );
35+
36+
virtual classType isA() const { return fileDataClass; }
37+
virtual char *nameOf() const { return "FileData"; }
38+
virtual int isEqual( const Object& ) const = 0;
39+
virtual int isLessThan( const Object& ) const = 0;
40+
virtual hashValueType hashValue() const { return 0; }
41+
virtual void printOn( ostream& ) const;
42+
43+
protected:
44+
45+
String fileName;
46+
Date fileDate;
47+
Time fileTime;
48+
long fileSize;
49+
50+
};
51+
52+
class FilesByName: public FileData
53+
{
54+
55+
public:
56+
57+
FilesByName( ffblk& blk ) : FileData( blk ) {}
58+
59+
virtual classType isA() const { return filesByNameClass; }
60+
virtual char *nameOf() const { return "FilesByName"; }
61+
virtual int isEqual( const Object& ) const;
62+
virtual int isLessThan( const Object& ) const;
63+
64+
};
65+
66+
class FilesByDate: public FileData
67+
{
68+
69+
public:
70+
71+
FilesByDate( ffblk& blk ) : FileData( blk ) {}
72+
73+
virtual classType isA() const { return filesByDateClass; }
74+
virtual char *nameOf() const { return "FilesByDate"; }
75+
virtual isEqual( const Object& ) const;
76+
virtual isLessThan( const Object& ) const;
77+
78+
};
79+
80+
class FilesBySize: public FileData
81+
{
82+
83+
public:
84+
85+
FilesBySize( ffblk& blk ) : FileData( blk ) {}
86+
87+
virtual classType isA() const { return filesBySizeClass; }
88+
virtual char *nameOf() const { return "FilesBySize"; }
89+
virtual isEqual( const Object& ) const;
90+
virtual isLessThan( const Object& ) const;
91+
92+
};
93+
94+
#endif

0 commit comments

Comments
 (0)