Stupid question, but I'm in the midst of translating some C code to assembler, and I'm stuck on one line.
return bufp > 0 ? buf[--bufp] : getchar();
Does this roughly translate to
if (bufp > 0)
buf[--bufp] = getchar();
return buf[--bufp]
??
I just don't want to translate it wrong, but I always get messed up with these stupid question marks in the code.
If it's of any consequence, bufp is an int, and bufp is an array of char's.