char* netMac() { int i; char *p=PropGet("MAC"); for(i=0;i<6;i++) mac[i]=htoi2(&p[i*2]); return mac; }
int main(int argc, char *argv[]) { const char *s = "0x7f"; unsigned i, i2; if (argc >= 2) s = argv[1]; i = htoi(s); i2 = htoi2(s); printf("htoi(%s) = %u (version 1) %u (version 2)\n", s, i, i2); return 0; }
char* netMac() { #ifdef VSIMU int i; char *p=PropGet("MAC"); for(i=0;i<6;i++) mac[i]=htoi2(&p[i*2]); return mac; // return "abcdef"; #endif #ifdef VREAL return (char*) rt2501_mac; #endif }