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
+46
View File
@@ -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
+83
View File
@@ -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 */
}