home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
i
/
iv26_w_3.zip
/
EXAMPLES
/
ICLASS
/
ICLASS.DSK
(
.txt
)
< prev
next >
Wrap
Turbo C Context File
|
1992-03-27
|
9KB
|
251 lines
Turbo C Context File
ICLASS.DEF
MAIN.C
ICLASS.C
GLOBALS.C
DIRECTOR.C
DIALOGS.C
CLASSINF.C
CLASSEDI.C
CLASSBUF.C
WINIVWIN.LIB
WINIV.LIB
ICLASS\*.*
REG*.H
INTERVIE\*.H
..\INCLUDE\DOS.H
D:\BORLANDC\IV\ICLASS\*.*
..\BAK\WPAINT.C
INTERVIE\X11\*.H
GetLogFont
Width
width
Width(
stencil
source
searchpath
overwrite
REPEXP.C
DIALOG.C
STRINGEDI.C
STRINGBRO.C
FILEBROW.C
REGEXP.C
ICLASS\*.C
REGEXPR.C
ICLASS.DEF
WINIV.LIB
WINIVWIN.LIB
D:\BORLANDC\IV\ICLASS\CLASSBUF.C
D:\BORLANDC\IV\WORLDREP.C
D:\BORLANDC\IV\WPALETTE.C
D:\BORLANDC\IV\WINTER.C
D:\BORLANDC\IV\XPAINT.C
D:\BORLANDC\IV\PAINTER.C
D:\BORLANDC\IV\WPAINTER.C
D:\BORLANDC\IV\INTERVIE\X11\PAINTERR.H
D:\BORLANDC\IV\WWORLD.C
D:\BORLANDC\IV\PAINTERR.C
D:\BORLANDC\IV\WPAINT.C
D:\BORLANDC\IV\WINTER.C
D:\BORLANDC\IV\WPAINTER.C
D:\BORLANDC\IV\WINTER.C
D:\BORLANDC\IV\EXAMPLES\ICLASS\MAIN.C
struct stat st;
return (
stat((char*)path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR
);
boolean successful = IsADirectory(path);
if (successful) {
Clear();
char* p = new char[128];
ffblk fbl;
strcpy(p, path);
if (p[strlen(p)] == '\\') {
strcat(p, "*.*");
} else {
strcat(p, "\\*.*");
int done = findfirst(p, &fbl, FA_DIREC);
while (!done) {
Insert(fbl.ff_name, Position(fbl.ff_name));
done = findnext(&fbl);
delete p;
}
static char dir[MAXNAMLEN+1];
return getcwd(dir, MAXNAMLEN+1);
Frame* framedDialog = new ShadowFrame(dialog,3,3);
World* world = GetWorld();
Coord x, y;
Align(Center, 0, 0, x, y);
GetRelative(x, y, world);
world->InsertTransient(framedDialog, this, x, y, Center);
void IClass::RemoveDialog (Interactor* dialog) {
Frame* framedDialog = (Frame*) dialog->Parent();
GetWorld()->Remove(framedDialog);
framedDialog->Remove(dialog);
delete framedDialog;
void IClass::Complain (const char* msg) {
if (msg == nil) {
fprintf(stderr, "%c", '\007');
} else {
AcknowledgeDialog complaint(msg);
InsertDialog(&complaint);
complaint.Acknowledge();
RemoveDialog(&complaint);
}
int re_search(regexp_t bufp, char* string, int size, int startpos,
int range, regexp_registers_t regs
regexp_t bufp, char* string1, int size1, char* string2,
int size2, int pos, int range, regexp_registers_t regs,
int mstop
regexp_t bufp, char* string1, int size1, char* string2, int size2,
int pos, regexp_registers_t regs, int mstop
regexp_t bufp, char* string, int size, int pos, regexp_registers_t regs
#include <windows.h>
#include <string.h>
const int MAXSIZE = 100;
const int MAXARGUMENT = 25;
HANDLE hInstance_;
HANDLE hPrevInstance_;
LPSTR lpCmdLine_;
int nCmdShow_;
int argc_ = 0;
char* argv_[MAXARGUMENT];
int argc;
char** argv;
* IVMain ist die Main-Funktion der InterViews Anwendung. Sie wird von
* WinMain, das selbst in diesem Header vor dem Anwender versteckt ist,
* aufgerufen.
int IVMain(int, char**);
* Die Message Queue der Applikation wird vergr
void SetMessageQueueLength () {
int size = MAXSIZE;
while (SetMessageQueue(size) == 0) {
size -= 5;
}
* Die beiden Parameter argc und argv werden, wie unter C bekannt und
* auch unter Interviews erwartet, erzeugt. IV ver
ndert argc und argv
* w
hrend des Programmablaufes. Daher ist es notwendig, die Kommando-
* zeilenparameter in einem eigenen Puffer abzustellen (argc_, argv_).
void SetCommandLineArguments () {
char* arg;
char module[128];
/* argv_[0] - Programmname */
GetModuleFileName(hInstance_, module, 128);
int len = strlen(module)+1;
argv_[argc_] = new char(len);
strcpy(argv_[argc_], module);
argc_++;
/* argv_[i] - Kommandozeilenparameter */
arg = strtok(lpCmdLine_, " ");
if (arg) {
argv_[argc_] = arg;
// new char(strlen(arg)+1);
// strcpy(argv_[argc_], arg);
argc_++;
while ((arg = strtok(NULL, " ")) != NULL) {
argv_[argc_] = arg;
// new char(strlen(arg)+1);
// strcpy(argv_[argc_], arg);
argc_++;
}
}
/* argc, argv */
argc = argc_;
argv = new char*[argc];
for (int i = 0; i < argc; i++) {
argv[i] = argv_[i];
}
void DeleteCommandLineArguments () {
delete argv_[0];
* Diese Funktion ist der Eintrittspunkt von Windows. Sie soll vor dem
* InterViews Anwender versteckt bleiben. Der Anwender hat damit das von
* X gewohnte Bild seines Hauptprogrammes (einzige Konvention:
* IVMain(int, char**) statt main(int, char**).
int PASCAL WinMain(
HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow
hInstance_ = hInstance;
hPrevInstance_ = hPrevInstance;
lpCmdLine_ = lpCmdLine;
nCmdShow_ = nCmdShow;
SetMessageQueueLength();
SetCommandLineArguments();
IVMain(argc, argv);
DeleteCommandLineArguments();
return(NULL);
if (strcmpi(ptr, "times") == 0) {
strcpy(typeface, "tms rmn");
} else if (strcmpi(ptr, "helvetica") == 0) {
strcpy(typeface, "helv");
} else if (strcmpi(ptr, "itc avant garde gothic") == 0) {
strcpy(typeface, "avant garde");
} else if (strcmpi(ptr, "new century schoolbook") == 0) {
}
if (strcmpi(typeface, "roman") == 0) {
strcpy(*font_resource, "romane.fon");
return true;
}
if (strcmpi(typeface, "tms rmn") == 0) {
strcpy(*font_resource, "tmsre.fon");
return true;
}
if (strcmpi(typeface, "courier") == 0) {
strcpy(*font_resource, "coure.fon");
return true;
}
if (strcmpi(typeface, "system") == 0) {
strcpy(*font_resource, "vgasys.fon");
return true;
}
if (strcmpi(typeface, "helv") == 0) {
strcpy(*font_resource, "helve.fon");
return true;
}
if (strcmpi(typeface, "modern") == 0) {
strcpy(*font_resource, "modern.fon");
return true;
}
if (strcmpi(typeface, "terminal") == 0) {
strcpy(*font_resource, "vgaoem.fon");
return true;
}
if (strcmpi(typeface, "symbol") == 0) {
strcpy(*font_resource, "symbole.fon");
return true;
}
if (strcmpi(typeface, "script") == 0) {
strcpy(*font_resource, "script.fon");
ifstream source;
char buf[FONTSTRINGSIZE];
char *ptr, *file;
file = searchpath("fonts.ali");
source.open(file, ios::nocreate);
while (!source.eof()) {
source.getline(buf, FONTSTRINGSIZE);
if (strstr(buf, f)) {
ptr = &buf[strlen(f)];
while (*ptr == ' ') {
ptr++;
}
strcpy(name, ptr);
return;
}
source.close();
ifstream source;
char buf[128];
char *ptr, *file;
file = searchpath("fonts.rsc");
source.open(file, ios::nocreate);
while (!source.eof()) {
source.getline(buf, 128);
if (strstr(buf, typeface)) {
ptr = strchr(buf, '@') + 1;
strcpy(*font_resource, ptr);
source.close();
return true;
}
source.close();
return false;