Mercurial > hg > CbC > old > device
view test/simp0.c @ 751:c921670e2ce8
i64 continue... 64bit register
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 14 Nov 2010 04:56:02 +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; }