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

 
Output of file : YCOMV.C contained in archive : DYNAM_S1.ZIP
/******************************** YCOMV.C ***********************************/
/***************** V=VARIOUS AND SUNDRY COMMANDS AND MENU ********************/
/********************* (C) 1986,7,8 by JAMES A. YORKE ************************/


#include "yinclud.h"
#include

int VCommands(CodeName)
register char *CodeName;
{
int oldTaskFlag;
long tloc;

TEST("circle") {
oldTaskFlag = taskFlag;
taskFlag = 100;
caseT();
taskFlag = oldTaskFlag;
return(1);
}
TEST("cont") {
refreshFlag = YES;
boot = 1;
return(1);
}
TEST2("cross", "k") { /* when cross0flag = 1, the large cross will be
plotted at each dot, and erased before the
next cross is drawn */
cross0flag = 1 - cross0flag;
if (SCREEN)
PRINT "Flag for printing a large cross at each dot is ");
toggle(cross0flag);
return(1);
}
TEST("db") {
boxx = 1 - boxx;
PRINT " DB: Draw Box toggle is currently");
toggle(boxx);
return(1);
}
TEST("images") {

images = (int) Entervalue((double) images, CHECKSET);
return(1);
}
TEST2("increment", "inc") {/* increment a variable by rho_step */
erase_line();
PRINT "Enter the name of the variable to be incremented:");
if(GetCommand(CodeName) == 0)
return(1);
TEST2("c1", "1")
incrementD(&C1, CodeName);
TEST2("c2", "2")
incrementD(&C2, CodeName);
TEST2("c3", "3")
incrementD(&C3, CodeName);
TEST2("c4", "4")
incrementD(&C4, CodeName);
TEST2("c5", "5")
incrementD(&C5, CodeName);
TEST2("c6", "6")
incrementD(&C6, CodeName);
TEST2("c7", "7")
incrementD(&C7, CodeName);
TEST2("c8", "8")
incrementD(&C8, CodeName);
TEST2("c9", "9")
incrementD(&C9, CodeName);
TEST2("r", "rho")
incrementD(&rho, CodeName);

return(1);
}
TEST2("p","pause")
{
if (cycle !=0)
cycle = 0;
else
cycle = 1;
if (SCREEN && level < PROCESS)
PRINT
" PAUSE: if on, when returning to screen, process will be paused; currently");
toggle(cycle);
return(1);
}
TEST("ph") {
onprint = (int) Entervalue((double) onprint, CHECKSET);
return(1);
}
TEST("ps") {
pprint(onprint);
beep();
return(1);
}

TEST2("pt", "printer") {
printer = (int) Entervalue((double) printer, CHECKSET);
return(1);
}
TEST("rcircle") {
oldTaskFlag = taskFlag;
boot = 1;
taskFlag = 100;
caseT();
taskFlag = oldTaskFlag;
return(1);
}
TEST("runtime") { /* set run time in minutes; */
setRunTime(); /* in Y.C */
return(1);
}
TEST("tic") {
if(ticFlag != 0)
ticFlag = 0;
else
ticFlag = 1;
erase_line();
PRINT
" Flag for drawing tic marks when drawing box is now ");
toggle(ticFlag);/* prints " ON\n" or " OFF\n" */
PRINT
"This is a toggle; enter this instruction again to turn it");
toggle(1 - ticFlag);/* prints " ON\n" or " OFF\n" */
PRINT
"An additional extra fine set of tic marks with 1/5 the spacing will be \n");
PRINT
"drawn if command \"TIC2\" has been called; that feature is turned off by \n");
PRINT
"entering \"TIC\". Interrupt 'T' also results in drawing this extra set. \n");
return(1);
}
TEST("tic2") {
ticFlag = 2;
erase_line();
PRINT
" Flag for drawing 2 sets of tic marks is now ON. Enter \"TIC\" to cancel.");
return(1);
}
TEST("time") {
PRINT asctime(localtime(&tloc)));
return(1);
}
return(0);
}

menuV() {
if(level == SETPARAM)
scr_clr(); /* in desmets pcio.a */
scr_rowcol(0, 2);



PRINT
" VARIOUS AND SUNDRY: OUTPUT MENU OF PRINTING and MISCELLANY \n\n");

PRINT
" CIRCLE: draw CIRCLE; center=y1[]; set radius with RA, # images with 'I'\n");

PRINT
" CONT: next computation should CONTinue with the current value of dot \n");

PRINT
" DB: (alias \"BOX\") Draw Box toggle; currently");
toggle(boxx);

PRINT
" IMAGES: sets the number of images of y0; see interrupt 'I'\n");

PRINT
" INC: changes the variable to incremented by interrupts +/- ;see also RS\n"
);



PRINT
" K: plots big cross at each dot if on; like interrupt 'k'; currently");
toggle(cross0flag);

PRINT
" PAUSE: if on, when returning to screen, process will be paused; currently");
toggle(cycle);

PRINT
" PH: the number of times the Printer Head strikes each dot; now = %d\n"
,onprint);

PRINT
" Set PH = 0 to prevent automatic print at end of plotting; \n");

puts(
" PS: Prints core version of previous Screen \n");

PRINT
" PT: (alias \"PRINTER\") amount of Printed Text. current setting = %d \n"
,printer);
PRINT
" RUNTIME: runtime\n");

PRINT
" TIC, TIC2: add TIC marks whenever drawing box toggle; currently");
toggle(ticFlag);

PRINT
" TIME: current time of day.\n");
}


  3 Responses to “Category : C Source Code
Archive   : DYNAM_S1.ZIP
Filename : YCOMV.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/