Removed references to library <time.h>

This commit is contained in:
Curtis F Kaylor 2019-11-15 14:16:58 -05:00
parent 0ca69fce81
commit 37d0fee589
3 changed files with 1 additions and 20 deletions

View File

@ -27,7 +27,6 @@
/* Initilize Compiler Variables */
void init(void) {
initim(); //Initialize Elapsed Time
DEBUG("Initializing Compiler Variables\n",0)
concnt = 0; //Number of Constants Defined
varcnt = 0; //Number of Variables in Table

View File

@ -7,11 +7,8 @@
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "common.h"
struct timespec curtim; //Current Time
/* Error - Print Input File name & position and exit */
void exterr(int errnum) {
fprintf(stderr, "Line %d Column %d of File %s\n", curlin, curcol, inpnam);
@ -29,19 +26,6 @@ void expctd(char *expstr) {
/* Print current position in file */
void prtpos(void) { if (inpnam[0]) printf("(%s: %d,%d) ", inpnam, curlin, curcol); }
/* Initialize elapsed time counter */
void initim(void) {
timespec_get (&curtim, TIME_UTC);
bgntim = curtim.tv_sec;
}
/* Print elapsed time */
void prttim(void) {
timespec_get (&curtim, TIME_UTC);
printf("[%d", curtim.tv_sec - bgntim);
printf(".%06d]",curtim.tv_nsec/1000);
}
/* Set comment to string */
void setcmt(char *s) { strcpy(cmtasm, s); }

View File

@ -41,10 +41,8 @@
#define TRUE -1
#define FALSE 0
void initim(); //Initialize elapsed time counter
void prtpos(); //Print current file name and position
void prttim(); //Print elapsed time
#define DEBUG(fmt, val) {if (debug) {prtpos(); prttim(); printf(fmt, val);}}
#define DEBUG(fmt, val) {if (debug) {prtpos(); printf(fmt, val);}}
#define DETAIL(fmt, val) {if (debug) printf(fmt, val);}
#define ERROR(fmt, val, err) {fprintf(stderr, fmt, val);exterr(err);}