Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Post top tier code

Name: Anonymous 2014-07-22 13:29

Can be yours or not, I just want to see something good.

Name: Anonymous 2014-07-23 6:24

>>6
I did not go for efficiency! I'd use assembly if I had to. From a quick glance I didn't understand cfb_copyarea, but it's been some time since I had to write C.

Except bitpacking, >>5 implements the concept of bitpointers, so you get single access to each bit with a pointer called bitptr. For example you can do this:
bitptr *p, *q;
/* p gets initialized to something */
q = p; // now q points to the same bitptr, incrementing q will increment p
*q = *p; // q is a copy of p, incrementing q does not affect p

Of course in C++ this could be written to be almost like a real pointer, with operator overloading.

>>7
AFAIK it can't, but a quick search does not reveal any reputable sources, or heck, even something relevant. The days I searched ISO pdf drafts is over, so I don't know. Assuming it can, the behavior is still defined. Overflow of unsigned integers is defined, therefore you'd just get less bits available than what you asked. Nothing catastrophic, like your PDP-7 exploding.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List