comp.lang.c http://groups-beta.google.com/group/comp.lang.c
Today's most active topics: * Daylight saving - 10 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a8f351326d6538ab * C function call cost. - 6 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c3f4cd2aa342d841 * K and R & Fuehrerschaft - 5 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cbe4162622b4bab5 * Tips on gaining proficiency in C - 5 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9d4264dd7b9939f9 * Passing and returning arrays to and from functions - 3 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/50e357c1706e0d40 Active Topics ============= system() doesnt give me the control back .. - 2 new ---------------------------------- ... If you were "restarting" this program by-hand, by logging in to this machine and typing a command, what would you type? BTW, please read the FAQ for this group. ... - Fri, Sep 17 2004 1:27 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/53feadfccffbb952 K and R & Fuehrerschaft - 5 new ---------------------------------- In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... ... And a candidate for the year for sure. ... - Fri, Sep 17 2004 1:38 am 5 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cbe4162622b4bab5 C function call cost. - 6 new ---------------------------------- ... "inline", if I understand it correctly, is a deceptively named modifier from the all but abandoned C99 standard, much like "register". What "inline" really means is that you guarantee that you will not take the address of that function -- and that's all. Good compilers will not take hints from programmers in this way about what code is actually inlined or not. Bad compilers may take it as a hint about inlining your code but that just reveals the fact that such compilers don't know how to clone, constant... - Fri, Sep 17 2004 1:50 am 6 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c3f4cd2aa342d841 speed of int vs bool for large matrix - all new ---------------------------------- ... It is OT. The only one who can tell which is faster, in practice (i.e., in your specific system), is you. Write it both ways, try both. And don't forget that the answer you get will apply only to the specific system upon which the answer was determined (and may vary even there due to such things as what else is running on the machine at the same time, etc.). If you don't know how to profile your code, either using the compiler and other tools, or by inserting calls to a timing routine, then you should find out, because clearly you... - Fri, Sep 17 2004 1:52 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cb38beb7c98d9c19 Accessing members of array as a different type - all new ---------------------------------- On 17 Sep 2004 00:08:45 GMT ... <snip> Not true. The processor could just silently ignore the low bit of the address or do something else even more screwy. Crashing is only the nicest way it can fail. <snip> ... This is a very good suggestion.... - Fri, Sep 17 2004 1:24 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3dada211e6610767 Passing and returning arrays to and from functions - 3 new ---------------------------------- Hello, ... size_t N is not only nicer but even makes most sense when using char arrays... :-) ... Spell it out: The actual "permutation function" provided by the OP is crap. I reordered the posting and comment on it now: I enter with Ctext[]="1111110000"; ... There was never a two in the original Ctext. ... I am not sure what this is to mean. I think it should have been something along the lines Ctext[i]=Ctext[index-1]; However, this is crap, too: Imagine the very simple permutation {3,1,2} working on {'0','0','1'}. This gives... - Fri, Sep 17 2004 2:12 am 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/50e357c1706e0d40 union access - 3 new ---------------------------------- ... In addition to being gratuitously insulting, this doesn't answer the question. Presumably the OP knows they are different things, and the question could be paraphrased as why do the different things exist, why are both needed; i.e., what is the difference. And I think other respondants have answered that. Perhaps the OP is interested by the observation that, given the rules of union access, most of the time a union could be replaced by a struct with the same members, and the behaviour would be the same (just some space would be... - Fri, Sep 17 2004 2:16 am 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/ae5339a09d904e21 Tips on gaining proficiency in C - 5 new ---------------------------------- ... Perhaps the version that is now in print fixes all the known Errata, I'm not sure. Be aware that the original 2nd Edition had several significant(?) errors, which have been corrected in a separate Errata document. Is there a reference in the C-FAQ, perhaps? Available on the web. ... - Fri, Sep 17 2004 2:28 am 5 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9d4264dd7b9939f9 #ifdef - all new ---------------------------------- ... It may be defined by the user, or somewhere in a header file, or in other project files such as "Makefile". If the documentation is any good, it should tell you what symbols are defined, and where. Often, especially under Unix and its ilk, compiling software is a two step process: the first step, "configure", queries your system and creates one or more header files containing bunches of macro definitions representing what kind of system it is; the second step, "make", then fires off the actual C compiler, which... - Fri, Sep 17 2004 3:12 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3bd78f7e89e53da8 Daylight saving - 10 new ---------------------------------- Is there any way to check whether daylight saving is enabled on a linux machine? ... - Fri, Sep 17 2004 4:14 am 10 messages, 8 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a8f351326d6538ab Floating point number to binary - all new ---------------------------------- ... As usual, you have difficulties engaging your brain... In this particular case, the result is implementation-defined for *exactly* the same reason it is implementation-defined in your suggested method: the representation of floating point values itself is implementation-defined. Aliasing any object by an array of unsigned char is blessed by the standard, no matter how the aliasing is achieved. See 6.5p7 and its footnote. Dan... - Fri, Sep 17 2004 7:07 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e706d56b01a84359 Q: Type'ing the infamous 'flags' field - 3 new ---------------------------------- ... I didn't have to: he always does. Dan... - Fri, Sep 17 2004 7:15 am 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/48da03290ab348d5 variable changed, but i didn't change is. - all new ---------------------------------- ... In C89 it's worse than "no need", "%lf" in printf invokes undefined behaviour. It's a new feature of C99, for the sake of improving the symmetry between scanf and printf conversion specifiers. Dan... - Fri, Sep 17 2004 7:36 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e8c4192f882ca31d need help with input and output files ASAP - all new ---------------------------------- ... Huh? How did you derive that from the input text? Never mind. I don't want to know. ... Figure out how to transform your input text into the required output format and write it to a file. I can't help you with the first part but second part is easy: ... int main(void) { char *file = "outputfile.txt"; char *text = "10,0,12345678,9abcdef, 1,1, 5,0"; FILE *out; out = fopen(file, "w"); if (out == NULL) { ... fclose(out); return EXIT_SUCCESS; ...... - Fri, Sep 17 2004 7:45 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/87df4278443e292e Why not 64 bit under 32? - all new ---------------------------------- ... Who said it can't? I've spent about one year working with 64-bit code under a 32-bit OS. Not to mention Windows NT on Alpha, which is a 32-bit OS implemented with 64-bit code. Ditto for certain OpenVMS/Alpha versions. ... Engage your brain: if it's a 32-bit program, how can the processor guess that certain opcodes must not be interpreted as 32-bit opcodes? ... What was your C language question? Dan... - Fri, Sep 17 2004 7:52 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3a28116e8ca9d2f2 ping source code - 2 new ---------------------------------- In article , ... Content-Type: text/html [EMAIL PROTECTED]:~ (0) $ ... it was HTML. dave ... - Fri, Sep 17 2004 10:03 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/224b55f45e882482 string & bytes - all new ---------------------------------- ... Well, since the OP was trying to write to a std::string, I was assuming C++ and wrote the code accordingly, but the actual question (what's this garbage in the middle of my struct) is applicable to both groups. ... - Fri, Sep 17 2004 10:43 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c28d3d26a0a9eaee declaring a function only if it isn't already declared - 2 new ---------------------------------- I'm writing a Linux device driver that needs to compile with several different Linux versions. In my code, I need to reference certain functions by their address alone. Something like this: int myfunc(char *x); if (memory_test[x] = = myfunc) ... In other words, I don't care about the return values or the parameters of myfunc(), I just need to reference it. In my case, myfunc() isn't a function that I've defined, but it may be declared in a header file that I'm including. The problem is that each Linux version has different header files for... - Fri, Sep 17 2004 2:28 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63a8a01635f04759 Loop Optimization, Array Alignment - 2 new ---------------------------------- ... Paul and Pete, Thank you both for your informative responses. Trying to do optimization there's just so many things one can play with and try, it really helps a non-expert like myself to get clarity on even a few issues, so I can focus on others. Regards, -rajeev- ... - Fri, Sep 17 2004 3:43 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/1184fe1e93506839 Embedded systems and C programming - all new ---------------------------------- Hi, Iam looking for some books which deal with Embedded software as well as C programming. I was suggested An Embedded software primer - David E Simon by a friend. Would like to have your feedback as well as some good book suggestions. Thanks, Shalini -- Shalini ... ... - Fri, Sep 17 2004 11: 09 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/fb96d3188cc25c75 [OT?] What is (a) "plunger"? - 2 new ---------------------------------- ... In any case, it would seem that Mr. Plauger has attained a certain celebrity status if the pronounciation of his name has become an issue. I also saw the editorial in CUJ and enjoyed same. In addition, I saw the lead article in a recent issue of DDJ, wherein he was awarded by DDJ for his contributions. Though my opinion in this regard has little value, I think he is to be congratulated! One hopes he finds this new status less than onerous.. . <grin> Fair dinkum, sir!! (ummm... did I get that right? lol!!)... - Fri, Sep 17 2004 6:07 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a10a1f005c8f5002 free() dumps core with a segfault. - all new ---------------------------------- ... find, and it is free() that detect errors typedef double Align; union header { struct { union header* ptr; ... typedef union header Header; static Header base; static Header *freep=NULL; Header *u, * v; <code> Why is it possible? (u + u->s.size) != v AND (unsigned)(v-u) - u-> s.size == 0 ... - Fri, Sep 17 2004 11:26 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/69917295e9776154 linux speaker beep - all new ---------------------------------- G'day, I'm writing a ringtone manager for nokia ringtones and I'd like to be able to play the ringtone on the PC speaker. I've had some success in DOS with turbo C and its sound(), delay() and nosound(). Is there anything similar for Linux? I know I can make a simple beep with '\a', but that's not what I need. If not, can someone please show me how to do this with the /dev/audio device? . .. - Sat, Sep 18 2004 12:52 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a0e2a5a961920995 ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.c". comp.lang.c http://groups-beta.google.com/group/comp.lang.c Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.c/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.c/subscribe ======================================================================= Google Groups: http://groups-beta.google.com ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BCfwlB/TM --------------------------------------------------------------------~-> <a href=http://English-12948197573.SpamPoison.com>Fight Spam! Click Here!</a> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/kumpulan/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
