Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 96acf50966
...
compare: b49ea6ccb2
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 02, 2011
Jason S. McMullan build: Ignore build debris
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
e439cb1
Jason S. McMullan doc/vbcc.pdf: Make sure the PDF ends up in the doc/ directory
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
caceef2
Jason S. McMullan build: Make the 'bin' directory if it doesn't already exist
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
9572c45
Jason S. McMullan build: Add an 'install' target
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
ca3e5d0
Jason S. McMullan m68k: GAS doesn't use '#' as a comment character
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
3145687
Jason S. McMullan vc: io.h is not needed, nor available on a POSIX system
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
4ddf5c1
Jason S. McMullan vc: Replace printf(buffer) with puts(buffer) - in case buffer had for…
…matting strings in it

Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
b49ea6c
Showing with 44 additions and 20 deletions.
  1. +14 −0 .gitignore
  2. +13 −2 Makefile
  3. +16 −17 frontend/vc.c
  4. +1 −1  machines/m68k/machine.c
View
14 .gitignore
@@ -0,0 +1,14 @@
+*.o
+bin/
+doc/*.html
+doc/vbcc.aux
+doc/vbcc.cp
+doc/vbcc.fn
+doc/vbcc.ky
+doc/vbcc.log
+doc/vbcc.pdf
+doc/vbcc.pg
+doc/vbcc.toc
+doc/vbcc.tp
+doc/vbcc.vr
+machines/*/dt.[ch]
View
15 Makefile
@@ -2,12 +2,23 @@
# used to create vbcc, vc and vcpp
CC = gcc -g -DHAVE_AOS4 #-DHAVE_ECPP -DHAVE_MISRA
LDFLAGS = -lm
+MKDIR = mkdir -p
+INSTALL = install
# native version; used to create dtgen
NCC = $(CC)
NLDFLAGS = $(LDFLAGS)
-all: bin/vc bin/vprof bin/vbcc$(TARGET) #bin/vcpp
+all: bin bin/vc bin/vprof bin/vbcc$(TARGET) #bin/vcpp
+
+install: all doc/vbcc.pdf
+ $(INSTALL) -D bin/vc $(DESTDIR)/bin/vc
+ $(INSTALL) -D bin/vprof $(DESTDIR)/bin/vprof
+ $(INSTALL) -D bin/vbcc$(TARGET) $(DESTDIR)/bin/vbcc$(TARGET)
+ $(INSTALL) -D doc/vbcc.pdf $(DESTDIR)/share/doc/vbcc/vbcc.pdf
+
+bin:
+ $(MKDIR) bin
vbccs: bin/vbccs$(TARGET)
@@ -18,7 +29,7 @@ bin/vprof: vprof/vprof.c
$(CC) vprof/vprof.c -o bin/vprof $(LDFLAGS)
doc/vbcc.pdf:
- texi2dvi --pdf doc/vbcc.texi
+ (cd doc; texi2dvi --pdf vbcc.texi)
doc/vbcc.html:
(cd doc;texi2html -split=chapter -nosec_nav -frames vbcc.texi)
View
33 frontend/vc.c
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <io.h>
#ifdef AMIGA
#pragma amiga-align
@@ -187,9 +186,9 @@ void add_name(char *obj,struct NameList **first,struct NameList **last)
struct NameList *new;
if(flags&VERYVERBOSE) printf("add_name: %s\n",obj);
if(!(new=malloc(sizeof(struct NameList))))
- {printf(nomem);raus(EXIT_FAILURE);}
+ {puts(nomem);raus(EXIT_FAILURE);}
if(!(new->obj=malloc(strlen(obj)+1)))
- {free((void *)new);printf(nomem);raus(EXIT_FAILURE);}
+ {free((void *)new);puts(nomem);raus(EXIT_FAILURE);}
if(first==&first_obj) linklen+=strlen(obj)+1;
strcpy(new->obj,obj);
new->next=0;
@@ -206,7 +205,7 @@ int read_config(const char *cfg_name)
FILE *file=0;
for(i=0;i<sizeof(search_dirs)/sizeof(search_dirs[0]);i++){
name=malloc(strlen(search_dirs[i])+strlen(cfg_name)+1);
- if(!name) {printf(nomem);raus(EXIT_FAILURE);}
+ if(!name) {puts(nomem);raus(EXIT_FAILURE);}
strcpy(name,search_dirs[i]);
strcat(name,cfg_name);
file=fopen(name,"r");
@@ -217,7 +216,7 @@ int read_config(const char *cfg_name)
p=getenv("VBCC");
if(p){
name=malloc(strlen(p)+strlen(cfg_name)+20);
- if(!name){printf(nomem);raus(EXIT_FAILURE);}
+ if(!name){puts(nomem);raus(EXIT_FAILURE);}
strcpy(name,p);
#if defined(_WIN32)||defined(MSDOS)
strcat(name,"\\config\\");
@@ -238,7 +237,7 @@ int read_config(const char *cfg_name)
size=ftell(file);
if(fseek(file,0,SEEK_SET)) return 0;
config=malloc(size+1);
- if(!config){printf(nomem);raus(EXIT_FAILURE);}
+ if(!config){puts(nomem);raus(EXIT_FAILURE);}
size=fread(config,1,size,file);
fclose(file);
count=0;p=config;
@@ -403,10 +402,10 @@ int main(int argc,char *argv[])
/* Nummer sicher... */
len+=strlen(ppname)+strlen(ccname)+strlen(asname)+
strlen(rmname)+strlen(scname)+strlen(userlibs)+NAMEBUF+100;
- if(!(command=malloc(len))){printf(nomem);raus(EXIT_FAILURE);}
- if(!(oldfile=malloc(len))){printf(nomem);raus(EXIT_FAILURE);}
- if(!(options=malloc(len))){printf(nomem);raus(EXIT_FAILURE);}
- if(!(ppopts=malloc(len))){printf(nomem);raus(EXIT_FAILURE);}
+ if(!(command=malloc(len))){puts(nomem);raus(EXIT_FAILURE);}
+ if(!(oldfile=malloc(len))){puts(nomem);raus(EXIT_FAILURE);}
+ if(!(options=malloc(len))){puts(nomem);raus(EXIT_FAILURE);}
+ if(!(ppopts=malloc(len))){puts(nomem);raus(EXIT_FAILURE);}
*options=0;*ppopts=0;
for(i=1;i<argc+count;i++){
if(i<argc) parm=argv[i]; else parm=confp[i-argc];
@@ -462,7 +461,7 @@ int main(int argc,char *argv[])
if(flags&VERYVERBOSE) printf("File %s=%d\n",file,t);
if(!cmname&&(flags&CROSSMODULE)&&t<=CCSRC){
cmname=malloc(NAMEBUF);
- if(!cmname){printf(nomem);exit(EXIT_FAILURE);}
+ if(!cmname){puts(nomem);exit(EXIT_FAILURE);}
if(tfl==OBJ){
strcpy(cmname,file);
}else{
@@ -517,7 +516,7 @@ int main(int argc,char *argv[])
char *s;
s=tmpnam(0);
cmfiles=malloc(strlen(s)+16);
- if(!cmfiles){printf(nomem);exit(EXIT_FAILURE);}
+ if(!cmfiles){puts(nomem);exit(EXIT_FAILURE);}
sprintf(cmfiles,"-cmd= \"%s\"",s);
cmdfile=fopen(s,"w");
if(!cmdfile){printf("Could not open <%s>!\n",s);exit(EXIT_FAILURE);}
@@ -528,17 +527,17 @@ int main(int argc,char *argv[])
#else
if(!cmfiles){
cmfiles=malloc(strlen(oldfile)+3);
- if(!cmfiles){printf(nomem);exit(EXIT_FAILURE);}
+ if(!cmfiles){puts(nomem);exit(EXIT_FAILURE);}
strcpy(cmfiles,oldfile);
}else{
cmfiles=realloc(cmfiles,strlen(cmfiles)+strlen(oldfile)+3);
- if(!cmfiles){printf(nomem);exit(EXIT_FAILURE);}
+ if(!cmfiles){puts(nomem);exit(EXIT_FAILURE);}
strcat(cmfiles," ");strcat(cmfiles,oldfile);
}
#endif
if(!cmoutput){
cmoutput=malloc(strlen(file)+1);
- if(!cmoutput){printf(nomem);exit(EXIT_FAILURE);}
+ if(!cmoutput){puts(nomem);exit(EXIT_FAILURE);}
strcpy(cmoutput,file);
}
break;
@@ -578,10 +577,10 @@ int main(int argc,char *argv[])
FILE *objfile=0;
char *tfname;
objects=malloc(linklen);
- if(!objects){printf(nomem);raus(EXIT_FAILURE);}
+ if(!objects){puts(nomem);raus(EXIT_FAILURE);}
linklen+=strlen(ldname)+strlen(destname)+strlen(userlibs)+10;
if(flags&VERYVERBOSE) printf("linklen=%d\n",linklen);
- if(!(linkcmd=malloc(linklen))){printf(nomem);raus(EXIT_FAILURE);}
+ if(!(linkcmd=malloc(linklen))){puts(nomem);raus(EXIT_FAILURE);}
p=first_obj;
if(linklen>=MAXCLEN){
tfname=tmpnam(0);
View
2  machines/m68k/machine.c
@@ -969,7 +969,7 @@ static void function_bottom(FILE *f,struct Var *v,long offset)
if(!v->fi) v->fi=new_fi();
v->fi->flags|=ALL_STACK;
v->fi->stack1=l2zm(size+loff+stack);
- emit(f,"%c stacksize=%ld\n",GAS?'#':';',size+loff+stack);
+ emit(f,"%c stacksize=%ld\n",';',size+loff+stack);
}
}
static void move(FILE *f,struct obj *q,int qreg,struct obj *z,int zreg,int t)

No commit comments for this range

Something went wrong with that request. Please try again.