Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bmcg.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!harpo!decvax!ittvax!dcdwest!sdcsvax!bmcg!bobn From: bobn@bmcg.UUCP (Bob Nebert) Newsgroups: net.sources Subject: Re: Financial Helper Message-ID: <1641@bmcg.UUCP> Date: Thu, 25-Apr-85 14:51:22 EST Article-I.D.: bmcg.1641 Posted: Thu Apr 25 14:51:22 1985 Date-Received: Sat, 27-Apr-85 06:17:20 EST References: none <466@bunkerb.UUCP> Organization: Burroughs Corp. ASG, San Diego, CA. Lines: 62 > > This is a program which you may find useful for calculating different > financial formulas. Probably the most interesting of the calculations > is the amortization schedule. > > Compile as follows: > > cc -O -ltermcap -lm -o > > where: > > is the name you have chosen for this source file > > is the name of the executable file > > P.S. Any fixes should be posted to the net. >>We have System V here and just a couple of changes had to be made >>On compile inst. use cc -O -lm -lcurses > > #include > #include > #include > >> change #include to #include /*10 lines past cut*/ > struct sgttyb otsgb; >>change to struct termio otsgb; /* 13 lines past cut*/ > iniline() > { > struct sgttyb ntsgb; > > if(isatty(fileno(stdin))) > { > ioctl(fileno(stdin), TIOCGETP, &otsgb); > ntsgb = otsgb; > ntsgb.sg_flags |= CBREAK; > ioctl(fileno(stdin), TIOCSETP, &ntsgb); > } > } >>On line 362 from cut change sgttyb to termio >>On line 366 change TIOCGETP to TCGETA >>On line 368 change sg_flags to c_lflag >>On line 368 change |= CBREAK; to &= ~ICANON; >>Add a line between 368 and 369 ntsgb.c_cc[VMIN]=1; ntsgb.c_cc[VTIME]=2; >>On line 369(old 369) change TIOCSETP to TCSETAF > > resetline() > { > if(isatty(fileno(stdin))) > { > ioctl(fileno(stdin), TIOCSETP, &otsgb); >>On line 377(old) change TIOCSETP to TCSETAF > ospeed = otsgb.sg_ospeed; /* was set in iniline routine */ >>On line 406 change sg_ospeed; to c_cflag & CBAUD; >>I dont personally know what all that junk means, all I do know is somebody here did it and the program works good. ********IS ANYBODY OUT THERE**********