Category : C Source Code
Archive   : DYNAM_S1.ZIP
Filename : YCOMUNDC.C

 
Output of file : YCOMUNDC.C contained in archive : DYNAM_S1.ZIP
/******************* (C) 1986,7,8 by JAMES A. YORKE **************************/
/********************** Routines in YCOMNDSU.C **************************
some routines in file:
int UndocumentedCommands()
int caseColor() -- moved to YSCREEN.C
ColorMenu() -- moved to YSCREEN.C
invert() -- moved to YCOMDE.C
***************************************************************************/

#include "yinclud.h"
/*#define DEBUG*/
static FILE * temp;


int UndocumentedCommands(CodeName)
char *CodeName;
{
int i,
oldCycle;
#ifdef DEBUG
fprintf(stderr, "UndocumentedCommands(%s)\n", CodeName);
pause(1.5);
#endif
#ifndef MAINFRAME
TEST("q")
{
setRGBColor();/* will be asked for color plus 3 integers */
return(1);
}
#endif /* ifndef MAINFRAME */
TEST("w")
{
whenAndWhere();/* for interrupt W and command W */
return(1);
}
TEST("sss") {
if(SCREEN) {
PRINT
"Enter an integer < 5 and 4 floating point numbers on one line.\n");

PRINT
"They must be separated by spaces, no commas then hit .\n");

PRINT
"Specifically: \n");

PRINT
"ScrnSec(>=0 and <=4) X_lower X_upper Y_lower Y_upper \n");
}

fscanf(input, " %d %lf %lf %lf %lf \n",
&ScrnSec, &X_lower, &X_upper, &Y_lower, &Y_upper);
if(SCREEN)
PRINT "ScrnSec=%d x=%lf X=%lf y=%lf Y=%lf\n",
ScrnSec, X_lower, X_upper, Y_lower, Y_upper);
ScreenConstants();
ScrnSec = 0;
return(1);
}
TEST("j") {
jay();
return(1);
}
TEST2("colp", "colorplanes") {
PRINT
"You have %d colorPlanes \n", colorPlanes);
colorPlanes = (int) Entervalue((double) colorPlanes, CHECKSET);
return(1);
}
TEST2("int", "intrpt") {
oldCycle = cycle;
cycle = 1;
Interrupt();
cycle = oldCycle;
return(1);
}
TEST("test") {
testFlag = 1 - testFlag;
PRINT "testFlag now = \n");
toggle(testFlag);
return(1);
}
/* The following 6 are for YU.C */
TEST("frac") {
frac = Entervalue(frac, CHECKSET);
return(1);
}
TEST("length") {
length = Entervalue(length, CHECKSET);
return(1);
}
TEST("add") {
add = Entervalue(add, CHECKSET);
return(1);
}
TEST("iter") {
iter = (int) Entervalue((double) iter, CHECKSET);
return(1);
}
TEST("gooditerate") {
goodIterate = (int) Entervalue((double) goodIterate, CHECKSET);
return(1);
}
TEST("oldgoodit") {
oldGoodIt = (int) Entervalue((double) oldGoodIt, CHECKSET);
return(1);
}
TEST("lyaptime") { /* the following three lyap-s are for reading
input from files and are not for direct use
by the user */
lyaptime = Entervalue(lyaptime, CHECKSET);
return(1);
}
TEST("lyapstep") {
lyapstep = Entervalue(lyapstep, CHECKSET);
return(1);
}
TEST("lyapsum") {
for(i = 0; i < num_lyap; i++)
/* for re-initializing vector lyapsum */
lyapsum[i] = Entervalue(lyapsum[i], CHECKSET);
return(1);
}
TEST("lyapzero") { /* this command is for reading maps from a file
*/
lyapzero = (int) Entervalue((double) lyapzero, CHECKSET);
return(1);
}
TEST("vec_dim") { /* this command is for reading maps from a file
*/
vec_dim = (int) Entervalue((double) vec_dim, CHECKSET);
return(1);
}
TEST("zeroth") { /* this command is for reading maps from a file
*/
zeroth = (int) Entervalue((double) zeroth, CHECKSET);
return(1);
}
TEST("initialization") {
/* this command is for reading maps from a file
*/
initializerFlag = YES;
return(1);
}
TEST("endinitialization") {
/* this command is for reading maps from a file
*/
initializerFlag = NO;
return(1);
}
TEST("dot") {
dot = (long) Entervalue((double) dot, CHECKSET);
return(1);
}
TEST("sf") {
screen_fraction = Entervalue(screen_fraction, CHECKSET);
return(1);
}
TEST("oxl") {
x_old_low = Entervalue(x_old_low, SETVALUE);/* code OXL */
return(1);
}
TEST("oxu") {
x_old_upp = Entervalue(x_old_upp, SETVALUE);/* code OXU */
return(1);
}
TEST("oyl") {
y_old_low = Entervalue(y_old_low, SETVALUE);
return(1);
}
TEST("oyu") {
y_old_upp = Entervalue(y_old_upp, SETVALUE);
return(1);
}
TEST("nxl") {
x_new_low = Entervalue(x_new_low, SETVALUE);/* code OXL */
return(1);
}
TEST("nxu") {
x_new_upp = Entervalue(x_new_upp, SETVALUE);/* code OXU */
return(1);
}
TEST("nyl") {
y_new_low = Entervalue(y_new_low, SETVALUE);
return(1);
}
TEST("nyu") {
y_new_upp = Entervalue(y_new_upp, SETVALUE);
return(1);
}
TEST("osd") {
OldDiameters = Entervalue(OldDiameters, SETVALUE);
return(1);
}
TEST("speed") { /* this command is not called by the program
and could be dispensed with; it puts the
program in a mode where iterate_map is not
called; however, it is in this state anyway
when it starts a process and is only kicked
out of it when IPP or L is called */
iteratee = IterIteratee;
return(1);
}
TEST("vertline") { /* for resumption of basin calculations */
VertLine = (int) Entervalue((double) VertLine, CHECKSET);
return(1);
}
TEST2("filestop", "5555") {
/* if code == 5555 OR 6666 we switch to keyboard input */
temp = input; /* store for later use */
input = StInput;
status = 1;
/* this means the disk file is NOT finished */
MainMenu();
PRINT setup);
PRINT
"\n Now enter command codes from the keyboard\n7777 continues disk read\n\n");
return(1);
}
TEST2("fileend", "6666") {
if(IsEndPIC == YES) {
fetchPic(NO);/* no means displace rather than add */
PRINT "Picture is loaded into pic[].\n");
}
/* if code == 6666 we switch to keyboard input */
NextArg();

if(SCREEN) {
MainMenu();
PRINT setup);
PRINT
"\n Now enter command codes from the keyboard\n\n");
}
return(1);
}
TEST2("filerestart", "7777") {
/* we switch back from keyboard input to disk input */
if(status == 0) {/* this means the disk file is finished */
PRINT
"\nNothing is available to be read from disk");
}
else
input = temp;
return(1);
}
return(0);
}





  3 Responses to “Category : C Source Code
Archive   : DYNAM_S1.ZIP
Filename : YCOMUNDC.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/