Mercurial > hg > CbC > old > device
view test/simp0.c @ 739:0c7a6ae119ba
i64 continue... compiler compiled.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Nov 2010 22:22:46 +0900 |
parents | 8eadf0db2970 |
children | c2c709727221 |
line wrap: on
line source
int printf(const char *format, ...); #define LBUFSIZE 10 static char current_file_dir[LBUFSIZE]; // keep track include file directory void copy_current_file_dir(char *name) { char *s = name; char *d = current_file_dir; char *p; for(p = d;d<current_file_dir+LBUFSIZE && *s; ) { if (*s=='/') p = d+1; *d++ = *s++; } *p = 0; } main(int ac,char *av[]) { printf("#0005:%d %d %d %s\n",1,2,3,&av[ac-1][3]); copy_current_file_dir("test/hoge"); printf("#0006:%s\n",current_file_dir); return 0; }