Re: [Libphidget-devel] Serial...
Status: Alpha
Brought to you by:
jstrohm
|
From: Jack S. <js...@ja...> - 2002-09-12 12:41:51
|
On Thu, 2002-09-12 at 03:27, Vadim Tkachenko wrote: > Jack, > > Code for extracting the serial number looks funny (phidget.c from 651 to > 659). he he, got that from somewhere else. > > Line 658: j is never used again... yeah, j could just be (i-2)/2 in that example > > General: one-letter variable names are evil... I agree, but I think they are fair game when used as temporary generic local variables (and you don't use a bunch of them at once). > > Question to self: how does C support Unicode? not sure, I'm sure some other library has it. I didn't want to require a whole library for turning a unicode into a number. > > Another one: how come that GCC compiles the code that mustn't compile under > true C? I don't follow, what do you mean exactly? > servo_example.cc: you've probably noticed that the Version string is not > null-terminated... I believe there's a CVS pseudo-variable name for what > you're trying to achieve, though I don't remember it right now. Plus, don't > forget that *that* is the *revision* of servo_example.cc file, not the > general version - in order to have that, you'll have to get the @VERSION@ - > probably make configure.in create config.h - that's a long story. I didn't find a CVS variable for what I wanted. Since those examples are one file only examples, then the version of the file is the version of the example. I was thinking about adding a function to the libraries to get there version info and printing that out also. |