From 37d0fee58915ef6d875a3f3b143fce9c2d66ce59 Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Fri, 15 Nov 2019 14:16:58 -0500 Subject: [PATCH] Removed references to library --- src/c02.c | 1 - src/common.c | 16 ---------------- src/common.h | 4 +--- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/c02.c b/src/c02.c index a73658f..d9c6414 100644 --- a/src/c02.c +++ b/src/c02.c @@ -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 diff --git a/src/common.c b/src/common.c index c2d1cfc..3cf15ad 100644 --- a/src/common.c +++ b/src/common.c @@ -7,11 +7,8 @@ #include #include #include -#include #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); } diff --git a/src/common.h b/src/common.h index 7ebee84..9dca134 100644 --- a/src/common.h +++ b/src/common.h @@ -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);}