May 8th, 2000

belize

(no subject)

been up since 7:15 ..... had breakfast w/ eli. skipping econ, it's just get-back-our-quizzes day. i was really awake a bit ago, but now I'm ready to go back to bed.
belize

(no subject)

back from my quiz and midterm .... things went exactly opposite as I had anticipated ... the quiz in digital design which is normally trivially easy turned out to be a pain in the ass: two variations of the same problem and very few people ended up figuring it out... I suppose it'll be graded on how much we scribbled down. On the other hand, the midterm in my gibberish class was a lot easier than I expected. I was the first one to leave even after double-checking my answers a few times, which I wasn't expecting at all. (that's not to say I did well, but that I at least thought I did well....) anyway, now to do some operating system homework and eat and maybe work on livejournal ... and taking a nap would be nice ... and organizing all my papers spread out around the room ... try to get my life in order, so many little annoying things have been bugging me lately.
belize

(no subject)

Who's the shit?
void
make_int_string (int ourInt, char *buffer, 
int buffersize, char **start, int *length)
{
int len = 1;
char *dig = &buffer[buffersize-1];
do {
*dig = (ourInt % 10) + '0';
ourInt /= 10;
if (ourInt) {
dig--;
len++;
}
} while (ourInt);
*length = len;
*start = dig;
}
This is C code that gets to compiled to MIPS binaries, and then gets run on our project operating system.... the fragment above writes to a buffer the character representation of an integer, since we need it to output integers to the console/pipe/file ... heh ... this is fun. (Note to people that are good at C: don't mock my code ... I write Perl and SQL all day ... for me this is some high-quality stuff...... :-))