Initial commit of "Rocket Workbench".

Taken from sources in CVS at:
    https://sourceforge.net/projects/rocketworkbench/

Sources extracted in two steps:
1. Pull entire project tree into a subdir "rwb" via "rsync":
    rsync -a a.cvs.sourceforge.net::cvsroot/rocketworkbench/ rwb/.
2. Export sources:
    export CVSROOT=$(pwd)/rwb
    SUBDIRS="analyser cpropep cpropep-web CVSROOT data libcompat libcpropep libnum libsimulation libthermo prop rocketworkbench rockflight"
    mkdir rwbx; cd rwbx
    cvs export -D now ${SUBDIRS}

After this (and some backups for safety), the directory content was
added to a Git repo:
    git init .
    git add *
This commit is contained in:
R. J. Dev. Kwan
2021-01-20 15:50:36 -08:00
commit eb05416991
411 changed files with 362300 additions and 0 deletions
@@ -0,0 +1,2 @@
ROOT = ../../..
include $(ROOT)/config/presrc.mk
@@ -0,0 +1,50 @@
CC = bcc32
CPP32 = cpp32
LIBRARIAN = tlib
LINKER = ilink32
RC = brc32
COPT = -3 -O2 -w-8004 -w-8012 -w-8057 -IC:\borland\bcc55\include
LDOPT = -LC:\borland\bcc55\lib
INCLUDEDIR = -I..\..\libnum\ -I.
DEF = -DBORLAND
COMPAT_LIBNAME = compat.lib
CPROPEP_LIBNAME = cpropep.lib
THERMO_LIBNAME = thermo.lib
COMPAT_LIBOBJS = compat.obj getopt.obj
THERMO_LIBOBJS = load.obj thermo.obj
CPROPEP_LIBOBJS = equilibrium.obj print.obj performance.obj derivative.obj
TLIBCOMPAT = +compat.obj +getopt.obj
TLIBTHERMO = +load.obj +thermo.obj
TLIBCPROPEP = +equilibrium.obj +print.obj +performance.obj +derivative.obj
.SUFFIXES: .c
all: $(CPROPEP_LIBNAME) $(THERMO_LIBNAME) $(COMPAT_LIBNAME)
.c.obj:
$(CC) $(DEF) $(INCLUDEDIR) $(COPT) -c $*.c -o $*.obj
$(COMPAT_LIBNAME): $(COMPAT_LIBOBJS)
tlib $@ $(TLIBCOMPAT)
$(CPROPEP_LIBNAME): $(CPROPEP_LIBOBJS)
tlib $@ $(TLIBCPROPEP)
$(THERMO_LIBNAME): $(THERMO_LIBOBJS)
tlib $@ $(TLIBTHERMO)
clean:
del *.obj
del *.bak
del *.tds
deep-clean: clean
del $(COMPAT_LIBNAME)
del $(CPROPEP_LIBNAME)
del $(THERMO_LIBNAME)
@@ -0,0 +1,68 @@
#ifndef COMPAT_H
#define COMPAT_H
/*
Checking for _MSC_VER will detect whether MSVC++ is being used.
I don't know of the other compiler flags, so others will want to
add to this for their own compilers.
Mark Pinese 24/4/2000
*/
#ifdef _MSC_VER
/* MSVC++ 6.0 Std */
#define STRNCASECMP _strnicmp
/* add for MSVC++ 5.0 */
#define STRCASECMP _stricmp
#ifdef _DEBUG
#include <crtdbg.h>
#endif /* defined (_DEBUG) */
#ifndef __cplusplus
typedef enum
{
false = 0,
true = 1
} bool;
#endif /* !defined (__cplusplus) */
#endif /* define _MSC_VER */
#ifdef GCC
#define STRCASECMP strcasecmp
#define STRNCASECMP strncasecmp
#define __min(a, b) ( (a) <= (b) ? (a) : (b))
#define __max(a, b) ( (a) >= (b) ? (a) : (b))
typedef enum
{
false = 0,
true = 1
} bool;
#endif /* define GCC */
#ifdef BORLAND
int StrNCaseCmp(const char *s1, const char *s2, size_t sz);
#define STRNCASECMP StrNCaseCmp
#define __min(a, b) ( (a) <= (b) ? (a) : (b))
#define __max(a, b) ( (a) >= (b) ? (a) : (b))
typedef enum
{
false = 0,
true = 1
} bool;
#endif /* define BORLAND */
#endif /* !defined(COMPAT_H) */
@@ -0,0 +1,10 @@
/* getopt.h from Don Libes "Obfuscated C" (extended by PRW) */
#ifndef GETOPT_H
#define GETOPT_H
extern int getopt(int argc, char **argv, char *opts);
extern char *optarg; /* current argv string */
extern int optind; /* current argv index */
extern int optopt; /* option character */
extern int opterr; /* getopt prints errors if 1 */
#endif /* GETOPT_H */
@@ -0,0 +1,3 @@
ROOT = ../../../..
include $(ROOT)/config/makedef
include $(ROOT)/config/libsrc.mk
@@ -0,0 +1,46 @@
#ifdef BORLAND
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
/* Compare two strings, ignoring case */
static int strcasecmp(const char *s1, const char *s2)
{
unsigned int i, len = strlen(s1)+1;
char c1, c2;
for (i = 0; i < len; ++i)
{
c1 = tolower(s1[i]);
c2 = tolower(s2[i]);
if (c1 != c2)
{
return ((c1 > c2) ? (1) : (-1));
}
}
return 0;
}
/* Compare two strings up to n characters, ignoring case */
static int strncasecmp(const char *s1, const char *s2, size_t sz)
{
unsigned int i, len = strlen(s1)+1;
char c1, c2;
if (sz < len) len = sz;
for (i = 0; i < len; ++i)
{
c1 = tolower(s1[i]);
c2 = tolower(s2[i]);
if (c1 != c2)
{
return ((c1 > c2) ? (1) : (-1));
}
}
return 0;
}
#endif
@@ -0,0 +1,83 @@
/* file getopt.c */
/* Author: Peter Wilson */
/* Catholic University and NIST */
/* pwilson@cme.nist.gov */
/* */
/* getopt() from Don Libes "Obfuscated C" */
#include <stdio.h>
#include <string.h>
/* getopt() -- parse command line arguments */
/* Original Author: AT&T */
/* This version from Don Libes "Obfuscated C and Other Mysteries" */
/* John Wiley & Sons, 1993. Chapter 6 */
#define ERR(s, c) if (opterr) {\
char errbuf[3];\
errbuf[0] = c; errbuf[1] = '\n'; errbuf[2] = '\0'; \
fprintf(stderr, "%s", argv[0]);\
fprintf(stderr, "%s", s);\
fprintf(stderr, "%s", errbuf); }
int opterr = 1; /* getopt prints errors if this is one */
int optind = 1; /* token pointer */
int optopt; /* option character passed back to user */
char *optarg; /* flag argument (or value) */
/* return option option character, EOF if no more or ? if problem */
int getopt(int argc, char **argv, char *opts) /* opts: option string */
{
static int sp = 1; /* character index in current token */
register char *cp; /* pointer into current token */
if (sp == 1) {
/* check for more flag-like tokens */
if(optind >= argc ||
argv[optind][0] != '-' || argv[optind][1] == '\0')
return(EOF);
else if(strcmp(argv[optind], "--") == 0) {
optind++;
return(EOF);
}
}
optopt = argv[optind][sp];
if(optopt == ':' || ( cp = strchr(opts, optopt)) == 0) {
ERR(": illegal option -- ", optopt);
/* if no chars left in this token, move to next token */
if(argv[optind][++sp] == '\0') {
optind++;
sp = 1;
}
return('?');
}
if(*++cp == ':') {/* if a value is expected, get it */
if(argv[optind][sp+1] != '\0')
/* flag value is rest of current token */
optarg = &argv[optind++][sp+1];
else if (++optind >= argc) {
ERR(": option requires an argument -- ", optopt);
sp = 1;
return('?');
} else
/* flag value is next token */
optarg = argv[optind++];
sp = 1;
} else {
/* set up to look at next char in token, next time */
if(argv[optind][++sp] == '\0') {
/* no m ore in current token, set up next token */
sp = 1;
optind++;
}
optarg = 0;
}
return(optopt); /* return current flag character found */
}
@@ -0,0 +1,2 @@
LIBNAME = libcompat.a
LIBOBJS = getopt.o compat.o