projects
/
my-code
/
arm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
800e17e
)
fixed binary writing
author
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Thu, 13 Sep 2007 12:09:56 +0000
(14:09 +0200)
committer
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Thu, 13 Sep 2007 12:09:56 +0000
(14:09 +0200)
betty/font2b.c
patch
|
blob
|
history
diff --git
a/betty/font2b.c
b/betty/font2b.c
index
6c1af61
..
fd88252
100644
(file)
--- a/
betty/font2b.c
+++ b/
betty/font2b.c
@@
-40,7
+40,7
@@
int main(int argc,char **argv) {
stat=CHAR;
if(argc==2) {
stat=CHAR;
if(argc==2) {
- fd=open(argv[1],O_WRONLY);
+ fd=open(argv[1],O_WRONLY
|O_CREAT
);
if(fd<0) {
perror("file open");
return fd;
if(fd<0) {
perror("file open");
return fd;
@@
-54,11
+54,13
@@
int main(int argc,char **argv) {
for(font=0;font<=0xff;font++) {
/* print the font number */
for(font=0;font<=0xff;font++) {
/* print the font number */
- printf("\t/* %d 0x%02x",font,font);
- if((font>0x1f)&(font<0x7f))
- printf(" %c */\n",font);
- else
- printf(" */\n");
+ if(stat==CHAR) {
+ printf("\t/* %d 0x%02x",font,font);
+ if((font>0x1f)&(font<0x7f))
+ printf(" %c */\n",font);
+ else
+ printf(" */\n");
+ }
/* print the array content of the font */
for(col=0;col<8;col++) {
/* print the array content of the font */
for(col=0;col<8;col++) {