Hi,

I'm analyzing volser/dumpstuff.c.
I can't understand the second part of this function:

static void
ReadString(register struct iod *iodp, register char *to, register int maxa)
{
    register int c;
    while (maxa--) {
        if ((*to++ = iod_getc(iodp)) == 0)
            break;
    }
    if (to[-1]) {
        while ((c = iod_getc(iodp)) && c != EOF);
        to[-1] = 0;
    }
}

What I don't really understand, what's that to[-1] stuff there?
(Anyway: is it correct in C having array index of -1? I haven't seen such 
before...)
If anybody knows the answer, please tell me.

-- 
Peter Somogyi
Software Developer, Gamax Ltd.
1114 Budapest, Bartok B. u 15/d
Tel.: +36-1-381-0544
e-mail: [EMAIL PROTECTED]

_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to