:: [DNG] "Common knowledge?"-question
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Rainer Weikusat
日付:  
To: dng
題目: [DNG] "Common knowledge?"-question
Can the effect of the following C function

static void print_start(char const *name, char const *what)
{
    char *buf, *p;
    unsigned name_len, what_len, total;


    name_len = strlen(name);
    what_len = strlen(what);
    total = name_len + what_len + 3;


    p = buf = alloca(total);
    memcpy(p, name, name_len);
    p += name_len;
    *p++ = ' ';
    memcpy(p, what, what_len);
    p += what_len;
    *p++ = ':';
    *p = ' ';


    *buf &= ~0x20;


    Write(2, buf, total);
}


be considered obvious or should it rather get an explanation?
?
An ASCII lowercase letter can be turned into the corresponding uppercase
letter by clearing the sixth bit.