home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
PASM.LZH
/
FXG.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-19
|
4KB
|
144 lines
#include <owl\owlpch.h>
#pragma hdrstop
#include <stdio.h>
#include <string.h>
#include <dos.h>
#include <cstring.h>
#include <dir.h>
#include "matrix.h"
#include "suflib.h"
#include "parts.h"
#include "profile.h"
#include "files.h"
#include "log.h"
static char *indfile = "_temp1.ind";
//static char *indfile2 = "_temp2.ind";
//static char *agcfile = "_temp.agc";
static char *frmfile = "_temp.frm";
//static char *sclfile = "Scale.Dat";
static char *cSufView = "_aview.bat";
static char *cSuf2Agc = "suf2agc.exe";
//static char *cAgcView = "agcvexec.exe";
static char *cExec = "exec_bin.exe";
static char *cview = "agcview.bin";
void FXG_Show(Parts *parts)
{
char str[256];
FILE *fp;
static int first = FALSE;
sprintf(str, "%s%s", fxgdir.c_str(), indfile);
if ((fp = fopen(str, "w")) == NULL) {
return;
}
sprintf(str, "%s%s", fxgdir.c_str(), frmfile);
parts->FileWrite(NULL, str, NULL);
fprintf(fp, "-fxga-pa\n");
fprintf(fp, "%s\n", fxg_atrfile.c_str());
fprintf(fp, "%s%s\n", fxgdir.c_str(), frmfile);
for (Parts *p = parts; p != NULL; p = p->next) {
for (Parts *op = parts; op != p && op != NULL; op = op->next) {
if (op->object == p->object) {
break;
}
}
if (op == p || op == NULL) {
char *f = p->object->filename;
if (strncmpi(f, partsdir.c_str(), partsdir.length()) == 0) {
fprintf(fp, "%s%s\n", simplepartsdir.c_str(), f+partsdir.length());
} else if (f[1] == ':' || f[0] == '\\') {
fprintf(fp, "%s\n", f);
} else {
fprintf(fp, "%s%s\n", simplepartsdir.c_str(), f);
}
}
}
fclose(fp);
sprintf(str, "%s%s", fxgdir.c_str(), cSufView);
if ((fp = fopen(str, "w")) == NULL) {
return;
}
if (first == FALSE) {
fprintf(fp, "%s%s %s%s 8000 8100\n", fxgdir.c_str(), cExec, fxgdir.c_str(), cview);
first = TRUE;
}
fprintf(fp, "%s%s @%s%s\n",
fxgdir.c_str(), cSuf2Agc,
fxgdir.c_str(), indfile);
fclose(fp);
WinExec(str, SW_SHOWMINIMIZED);
}
#if 0
void FXG_Show(Parts *parts)
{
char str[256];
FILE *fp;
static int first = FALSE;
sprintf(str, "%s%s", fxgdir.c_str(), indfile);
if ((fp = fopen(str, "w")) == NULL) {
return;
}
sprintf(str, "%s%s", fxgdir.c_str(), frmfile);
parts->FileWrite(NULL, str, NULL);
fprintf(fp, "%s\n", fxg_atrfile.c_str());
fprintf(fp, "%s%s\n", fxgdir.c_str(), frmfile);
for (Parts *p = parts; p != NULL; p = p->next) {
for (Parts *op = parts; op != p && op != NULL; op = op->next) {
if (op->object == p->object) {
break;
}
}
if (op == p || op == NULL) {
char *f = p->object->filename;
if (f[1] == ':' || f[0] == '\\') {
fprintf(fp, "%s\n", f);
} else {
fprintf(fp, "%s%s\n", simplepartsdir.c_str(), f);
}
}
}
fprintf(fp, "-z%s%s\n", fxgdir.c_str(), sclfile);
fprintf(fp, "-o%s%s\n", fxgdir.c_str(), agcfile);
fclose(fp);
sprintf(str, "%s%s", fxgdir.c_str(), indfile2);
if ((fp = fopen(str, "w")) == NULL) {
return;
}
fprintf(fp, "-z%s%s\n", fxgdir.c_str(), sclfile);
fprintf(fp, "%s%s\n", fxgdir.c_str(), agcfile);
fprintf(fp, "%s\n", fxg_colfile.c_str());
sprintf(str, "%s%s", fxgdir.c_str(), cSufView);
fclose(fp);
if ((fp = fopen(str, "w")) == NULL) {
return;
}
if (first == FALSE) {
fprintf(str, "%s%s %s%s\n", fxgdir.c_str(), cExec, fxgdir.c_str(), cview);
first = TRUE;
}
fprintf(fp, "%s%s @%s%s\n",
fxgdir.c_str(), cSuf2Agc,
fxgdir.c_str(), indfile);
fprintf(fp, "%s%s @%s%s\n",
fxgdir.c_str(), cAgcView,
fxgdir.c_str(), indfile2);
fclose(fp);
WinExec(str, SW_SHOWMINIMIZED);
}
#endif