Commit 65879ea7 authored by Armando I. Rivera's avatar Armando I. Rivera

Update Copyright year

parent 38d6dd22
......@@ -1075,9 +1075,9 @@ END SET
' CODE BEGINS
'*************************************************************************
FUNCTION main(ARGC AS INTEGER, ARGV AS PCHAR PTR)
GLOBAL szTmp$ * 1048576 'This is a problem, cannot exceed 2047+1 or bad things *WILL* happen.
GLOBAL Src$ * 1048576 'This is a problem, cannot exceed 2047+1 or bad things *WILL* happen.
GLOBAL AbortSrc$ * 1048576 'This must be at least the size of Src$
GLOBAL szTmp$ * 65535 'This is a problem, cannot exceed 2047+1 or bad things *WILL* happen.
GLOBAL Src$ * 65535 'This is a problem, cannot exceed 2047+1 or bad things *WILL* happen.
GLOBAL AbortSrc$ * 65535 'This must be at least the size of Src$
GLOBAL WarnMsg$ * 32767 'This must be MORE than the size of Src$
GLOBAL RmLibs$ * 32767 ' libraries to remove
LOCAL bitz as INTEGER ' is OS 32/64 bit
......@@ -1107,7 +1107,7 @@ FUNCTION main(ARGC AS INTEGER, ARGV AS PCHAR PTR)
IF COMMAND$ = "" THEN
!#if defined (__APPLE__)
PRINT "MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-2015"
PRINT "MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-",TIME$(5)
!#else
PRINT "MBC3: Based on Linux BCX by Mike Henning (c) 2009"
PRINT "(c) 2009-2011 Armando Rivera with additional code (c) 2009 John Jacques",LF$
......@@ -1182,7 +1182,7 @@ FUNCTION main(ARGC AS INTEGER, ARGV AS PCHAR PTR)
PRINT "MBC Version ", Version$
!#if defined (__APPLE__)
IsApple = TRUE
PRINT "MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-2015",LF$
PRINT "MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-",TIME$(5),LF$
!#else
PRINT "MBC3: Based on Linux BCX by Mike Henning (c) 2009"
PRINT "(c) 2009-2011 Armando Rivera with additional code (c) 2009 John Jacques",LF$
......
......@@ -702,6 +702,7 @@ void _splitpath_(const char* path, char* drv, char* dir, char* name, char* ex
char* StrToken (char*,char*,int);
char* RemoveStr (char*,char*);
char* IRemoveStr (char*,char*);
char* timef (int i=0);
char* join (int, ... );
char* enc (char*, int=0, int=0);
char* chr(int,int=0,int=0,int=0,int=0,int=0,int=0,int=0,int=0,int=0);
......@@ -888,6 +889,8 @@ static char* ReservedWord[]=
// -------------------------------------------
// * Changed default string size to 65K from
// 2k, which was limiting.
// * Updated output of PRINT command, eliminating
// leading spaces from numbers.
// -------------------------------------------
// 2015-07-03 Armando Rivera
// -------------------------------------------
......@@ -1647,6 +1650,46 @@ char *space (int count)
}
char *timef (int t)
{
time_t elapse_time;
struct tm *tp;
char *strtmp = BCX_TmpStr(256);
time (&elapse_time);
tp = localtime(&elapse_time);
switch (t)
{
case 0:
strftime(strtmp,256,"%H:%M:%S",tp); break;
case 1:
strftime(strtmp,256,"%H",tp); break;
case 2:
strftime(strtmp,256,"%M",tp); break;
case 3:
strftime(strtmp,256,"%S",tp); break;
case 4:
strftime(strtmp,256,"%p",tp); break;
case 5:
strftime(strtmp,256,"%Y",tp); break;
case 6:
strftime(strtmp,256,"%m",tp); break;
case 7:
strftime(strtmp,256,"%d",tp); break;
case 8:
strftime(strtmp,256,"%A",tp); break;
case 9:
strftime(strtmp,256,"%w",tp); break;
case 10:
strftime(strtmp,256,"%j",tp); break;
case 11:
strftime(strtmp,256,"%U",tp); break;
case 12:
strftime(strtmp,256,"%m/%d/%y",tp); break;
}
return strtmp;
}
char *enc (char *A, int L, int R)
{
char *BCX_RetStr = BCX_TmpStr(strlen(A)+3);
......@@ -2161,9 +2204,9 @@ int main (int argc, PCHAR* argv)
{
G_argc=argc;
G_argv=argv;
szTmp=(char*)calloc(256+1048576,1);
Src=(char*)calloc(256+1048576,1);
AbortSrc=(char*)calloc(256+1048576,1);
szTmp=(char*)calloc(256+65535,1);
Src=(char*)calloc(256+65535,1);
AbortSrc=(char*)calloc(256+65535,1);
WarnMsg=(char*)calloc(256+32767,1);
RmLibs=(char*)calloc(256+32767,1);
static int bitz;
......@@ -2186,7 +2229,7 @@ int main (int argc, PCHAR* argv)
if(command(-1)[0]==0)
{
#if defined (__APPLE__)
printf("%s\n","MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-2015");
printf("%s%s\n","MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-",timef(5));
#else
printf("%s\n","MBC3: Based on Linux BCX by Mike Henning (c) 2009");
printf("%s%s\n","(c) 2009-2011 Armando Rivera with additional code (c) 2009 John Jacques",LF);
......@@ -2296,7 +2339,7 @@ int main (int argc, PCHAR* argv)
printf("%s%s\n","MBC Version ",Version);
#if defined (__APPLE__)
IsApple=TRUE;
printf("%s%s\n","MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-2015",LF);
printf("%s%s%s\n","MBC4: Ported to Mac OSX by Armando Rivera (c) 2009-",timef(5),LF);
#else
printf("%s\n","MBC3: Based on Linux BCX by Mike Henning (c) 2009");
printf("%s%s\n","(c) 2009-2011 Armando Rivera with additional code (c) 2009 John Jacques",LF);
......@@ -2759,7 +2802,7 @@ READNEXTLINE:;
LinesRead+=(ModuleLineNos[1]);
Elapsed=Round((float)clock()/(float)CLOCKS_PER_SEC,2);
printf("%s%d%s%d%s","[Lines In:",(int)LinesRead,"] [Lines Out:",(int)gLinesWritten,"] ");
printf("%s%d%s% .7G%s\n","[Statements:",(int)Statements,"] [Time:",(float)Elapsed," sec's]");
printf("%s%d%s%.7G%s\n","[Statements:",(int)Statements,"] [Time:",(float)Elapsed," sec's]");
strcpy(Z, join(4,"BCX translated ",RemoveStr(FileIn," ")," to ",RemoveStr(FileOut," ")));
printf("%s\n",Z);
}
......@@ -3945,7 +3988,7 @@ char * PrintWriteFormat (int DoWrite)
}
else
{
strcat(Frmat,"% .7G");
strcat(Frmat,"%.7G");
}
strcpy(Arg, join(3,Arg,",(float)",Stak[i].Arg));
break;
......@@ -3958,7 +4001,7 @@ char * PrintWriteFormat (int DoWrite)
}
else
{
strcat(Frmat,"% .15G");
strcat(Frmat,"%.15G");
}
strcpy(Arg, join(3,Arg,",(double)",Stak[i].Arg));
break;
......@@ -3971,7 +4014,7 @@ char * PrintWriteFormat (int DoWrite)
}
else
{
strcat(Frmat,"% .19LG");
strcat(Frmat,"%.19LG");
}
strcpy(Arg, join(3,Arg,",(LDOUBLE)",Stak[i].Arg));
break;
......@@ -4004,10 +4047,10 @@ char * PrintWriteFormat (int DoWrite)
}
RemoveAll(ZZ,"()");
strcpy(ZZ,iReplace(ZZ,"char *","%s"));
strcpy(ZZ,iReplace(ZZ,"int","% d"));
strcpy(ZZ,iReplace(ZZ,"float","% .7G"));
strcpy(ZZ,iReplace(ZZ,"ldouble","% .19LG"));
strcpy(ZZ,iReplace(ZZ,"double","% .15G"));
strcpy(ZZ,iReplace(ZZ,"int","%d"));
strcpy(ZZ,iReplace(ZZ,"float","%.7G"));
strcpy(ZZ,iReplace(ZZ,"ldouble","%.19LG"));
strcpy(ZZ,iReplace(ZZ,"double","%.15G"));
}
strcat(Arg,Cast);
if(!((UCHAR)*(Stak[i].Arg)==40))
......@@ -4030,7 +4073,7 @@ char * PrintWriteFormat (int DoWrite)
}
else
{
strcat(Frmat,"% G");
strcat(Frmat,"%G");
strcpy(Arg, join(3,Arg,",(float)",Stak[i].Arg));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment