return to first page linux journal archive
keywordscontents

Listing 2

*/
*/ file: patch-c.linux
*/
*/ ------------------ definitions
*define unix,cheap
*define plot,mcplot,gkssim,xlib
*/
*/ ------------------ block data
*/ add two more include files needed by new ttyint and getidt routines
*i,mc.5
#include<sys/signal.h>
#include<locale.h>
*/ add a definition needed by new getidt routine
*i,mc.18
#define MAXLEN 20
*/ edit declaration syntax where needed for 
*/ g77 access
*d,mc.79
float etime_(a)
*d,mc.104
xgopwk_(error_flag)
*d,mc.156
xgclwk_()
*d,mc.167
xgacwk_()
*d,mc.215
xgdawk_()
*d,mc.228
xgclrw_()
*d,mc.238
xguwk_()
*d,mc.249
xgpl_(x1,y1,x2,y2)
*d,mc.265
xgtx_(string,length,x,y)
*d,mc.339
xgschh_(ch)
*d,mc.352
xgschu_(x,y)
*d,mc.370
xgswn_(x1,x2,y1,y2)
*d,mc.415
xgrqlc_(flag,x,y)
*d,mc.458
xgfa_(x1,y1,x2,y2)
*d,mc.474
xgsplc_(ic)
*d,mc.486
xgqcf_(type,nc)
*d,mc.510
xlnwid_(scale)
*/ add the ttyint and getidt routines
*i,mc.619
ttyint_()
{
 extern void pttyin_();
 signal( SIGINT, pttyin_ );
 return;
}
char getidt_(char buff[MAXLEN])
{
size_t strftime();
struct tm *timeptr;
time_t clock;
int count, darray[3];
clock = time(0);
timeptr = localtime(&clock);
count = strftime(buff, MAXLEN, "  %m/%d/%y %H:%M:%S", timeptr);
return(buff);
}