Mercurial > hg > CbC > old > device
view test/simp0.c @ 928:96c53f76b360
fix
author | kono |
---|---|
date | Sun, 13 Apr 2014 10:21:40 +0900 |
parents | c2c709727221 |
children |
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("#0021:%d %d %d %s\n",1,2,3,&av[ac-1][3]); copy_current_file_dir("test/hoge"); printf("#0023:%s\n",current_file_dir); return 0; }