Mercurial > hg > CbC > old > device
view test/cext.c @ 885:1a027275743d
struct returinng function have to be indirect.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 05 Apr 2014 21:12:43 +0900 |
parents | a22aabb27786 |
children | d712ee10feb7 |
line wrap: on
line source
int printf(const char *format, ...); unsigned int u; static char current_file_dir[1024] ; void f(char *name) { char *s = name; char *q = current_file_dir; printf("%s and %s\n",s,q); } main() { int i,k; unsigned uk; char c = -3; printf("char is %ssigned\n", c==256-3? "un":""); for(i=-3;i<4;i++) { k = (char) i; uk = (unsigned char) i; printf("#0011:%d %u\n",k,uk); k = (short) i; uk = (unsigned short) i; printf("#0014:%d %u\n",k,uk); } u = (unsigned) -23432; printf("#0018:%d\n",u/(8048+5)); current_file_dir[0] = 'k'; current_file_dir[1] = 'a'; current_file_dir[2] = 't'; current_file_dir[3] = 'e'; current_file_dir[4] = 0; f("john"); return 0; }