char aa[6];

PrintBYTE(stdout, "aa: ", aa, 6);

#define PrintBYTE(pfile, msg, Data, DataLen) {            \
    int idx;                                            \
    fprintf(pfile, "%5s =", msg);                        \
    for( idx=0; idx<(int)DataLen; idx++) {                \
        if( (idx==0) || ((idx%16)!=0) )                    \
            fprintf(pfile, " %.2x", Data[idx]);            \
        else                                            \
            fprintf(pfile, "\n\t%.2x", Data[idx]);        \
    }                                                    \
    fprintf(pfile, "\n");                                \
}
2009/10/11 15:51 2009/10/11 15:51
TAG
Trackback address :: http://4ellene.net/tt/trackback/1297

Comments List

Write a comment.

[로그인][오픈아이디란?]