comp.lang.c http://groups-beta.google.com/group/comp.lang.c
Today's most active topics: * struct named 0 - 13 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b7026c716c8ddf97 * Is there a Swap faster than using XOR!!! - 9 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b4478c278a5ebed4 * Are array members guaranteed to be contiguous in physical memory? - 8 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/33df718bbf14c3b6 * reformatting strings and memory issue - 7 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c82e54fafce3fc77 * Learning C with Older books ?. - 7 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/66bc74d8d8d22b33 Active Topics ------------- K&r chapter-1; exc-17 - 2 new ----------------------------- ...I did not snip you unfairly. I snipped the majority of your article because I wasn't commenting on it; I quoted only what was relevant to my followup. The bulk of your article may well have been perfectly topical. I have nothing more to add. - Mon, Nov 29 2004 10:42 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d137c89c905b9d97 free sftp C library, Most Wanted ;-) - 3 new -------------------------------------------- ...Are you deliberately trying to mislead him? He said he wants a *library*, you direct him to code that contains *applications*. There is no *library* support for sftp there. - Mon, Nov 29 2004 12:12 pm 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/590fdb013fab238f Is there a Swap faster than using XOR!!! - 9 new ------------------------------------------------ ...It might overflow. Your assumption that two instructions may be slower than one instruction is also false. - Mon, Nov 29 2004 10:46 am 9 messages, 8 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b4478c278a5ebed4 Systems software versus applications software definitions - 3 new ----------------------------------------------------------------- ...Tell me about it ! As someone who writes a third party debugger for a living I certainly fell the pain of dealing with many ill specified external interfaces. A debugger is certainly dependent on more such interfaces than a compiler. - Mon, Nov 29 2004 9:06 am 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3fa8770993ebe026 Why in stdint.h have both least and fast integer types? - 2 new --------------------------------------------------------------- ...... ...That would create incompatibilities between modules compiled with different optimisation settings : a horrible side effect, that would cause unlimited headaches ! My understanding is that int16_t must be exactly 16 bits. int_least16_t should be the practical choice on machines where 16 bit ints have - Mon, Nov 29 2004 12:51 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/abc19ced0e9928b2 simple file system - 1 new -------------------------- ...I was under the impression that "b" was a DOS-only thing. But some reading has put me right. ANSI X3.159-1989 (``ANSI C'') does define it, it's just ignored on most Un*x's. ...Not much... - Mon, Nov 29 2004 1:20 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/efcbc57274d6a188 IVT at address 0 - 6 new ------------------------ Hi, Just another question for the standards jockeys... Suppose I have an Interrupt Vector Table located at address 0x0000 (16-bit machine). I want to dump the context of the IVT, by treating it as an array starting at (you guessed it) 0x0000. So I would have struct iv_s* ivt = (struct iv_s *) 0x0000; - Mon, Nov 29 2004 1:48 pm 6 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/544cc5168c075195 doubts related to disk files in C - 4 new ----------------------------------------- hello, i have a very specific doubt related to file handling. My objective is to make some modifications in the output data file of one software which would be the input data file for another software. Below is the output Data file in which i have to make some changes. %% Version 3.0 %% VertexNumber: 129 - Mon, Nov 29 2004 5:31 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8fe99ce348f0c505 Unix C programming for finding file - 4 new ------------------------------------------- ...Except, of course, that the OED advocates (and quotes a largely bogus argument for) the use of words ending in "-ize" where most other Anglophones except those following that fool Webster's lead use "-ise". Otherwise, yes. Richard - Mon, Nov 29 2004 3:08 pm 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f656fbf7205c815e Are array members guaranteed to be contiguous in physical memory? - 8 new ------------------------------------------------------------------------- Thats the question. I know about virtual memory, and the MMU. I just wonder if array members guaranteed to be contiguous in physical memory (and if so, why). Thanks, Olumide - Mon, Nov 29 2004 10:10 am 8 messages, 7 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/33df718bbf14c3b6 fseek past the eof - 4 new -------------------------- Can anyone tell me what the standard says about using fseek (on a binary file) to seek past the end-of-file? I can't find anything in my (draft) copy of the standard, nor in the FAQ. Thanks - Mon, Nov 29 2004 10:26 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/1b2acc8dfc8dbc12 Nth request of book recommendations - 2 new ------------------------------------------- ...I'm not familiar with the H & S book but I just looked at the table of contents online. It seems to cover ALL of the C syntax and libraries and looks like an good reference. Advanced C Tips and Techniques looks like it covers some things that aren't in the H & S book. But that's because it covers a few techniques in depth and - Mon, Nov 29 2004 7:31 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/13cd6c4626c5730c Typedef with GCC/G++ - 1 new ---------------------------- ...Since no one bothers to address the real issue, here is a clue : It it legal to use a struct tag as a typedef for a pointer to said structure, but it stinks (C is not Java ;-) In C++ it is probably incorrect as the struct tag is already type name for the struct itself. I assume the following would be OK in both languages : - Mon, Nov 29 2004 2:21 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/57cceab6ca5afdf0 Learning C with Older books ?. - 7 new -------------------------------------- ...Does it? I thought it only assumed a standard C compiler. ...You mean on the first edition? That would be quite natural. ...I haven't got my copy to hand, but I do seem to recall that they mention 'lint'. Even so, I've never used it and would hardly call it a 'necessary tool'. ...That is your privilege, but it would be nice if you could justify your - Mon, Nov 29 2004 3:49 pm 7 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/66bc74d8d8d22b33 reformatting strings and memory issue - 7 new --------------------------------------------- ...That doesn't exactly look like what you're trying to do below, but I guess you just did got something mixed up here - otherwise there would have to be some transformations of the numbers after "POINT". ...No, you don't, see below. ...It's prudent to check that strrchr() didn't return NULL. (Why do - Mon, Nov 29 2004 4:12 pm 7 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c82e54fafce3fc77 Typecasting Pointers - 1 new ---------------------------- ...There are various alternatives, but I prefer structure assignment with a static const initializer: #include <stdlib.h> static struct foo *alloc_foo( void) { static const struct foo foo0 = {0}; struct foo *newfoo = malloc(sizeof *newfoo); if (newfoo) *newfoo = foo0; - Mon, Nov 29 2004 3:45 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/636e7838a3ded7f4 struct named 0 - 13 new ----------------------- ...Following the pointer into memory would make it impossible to determine the address of the field. The & cancels out the apparent dereference. - Mon, Nov 29 2004 4:13 pm 13 messages, 7 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b7026c716c8ddf97 C/ UNIX--CONTRACT TO PERM--IN - 1 new ------------------------------------- OMNI GROUP [EMAIL PROTECTED] 419-380-8853 C/ UNIX---CONTRACT TO PERM- ---IN - Mon, Nov 29 2004 11:51 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/83abc5291bc1d9fd Questions about malloc() - 2 new -------------------------------- In article <[EMAIL PROTECTED]>, ...Just like any other general-purpose high-level language, then? dave - Mon, Nov 29 2004 6: 28 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/82b0dc0981bf3664 Portable repulsive type extension ? - 1 new ------------------------------------------- ... ...It's impossible to terminate the last line of a macro with a backslash. (because then, it is no longer the last line) - Mon, Nov 29 2004 7:45 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b8abcf00892e5667 a good C book - 4 new --------------------- ...desperately ...such links. A discussion of books for the beginner and the intermediate user is an obvious candidate for a FAQ. I don't think it's peddling books or becoming partisan to create ยง20.41 where Mr. Summit might say something along the lines that K&R2 and H&S are the most referenced books in the FAQs. MPJ - Mon, Nov 29 2004 1:47 pm 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/16e44bbe912cfe40 Simple vsscanf source code - 1 new ---------------------------------- i found a better version at: [url] [link] this one uses strtod, strtoi, strtol, instead of sscanf. can i use : Code: -------------------- -------------------- tags in my post. maybe we should be able to. -- MarcSmith -------------------- ---------------------------------------------------- - Sat, Nov 27 2004 7:38 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a30eda8520eca98b wcsftime output encoding - 4 new -------------------------------- -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ...[...] OK, that matched my understanding, but still didn't satisfy my question. Reading the N869 draft may help me rephrase it, however. - From the draft (5.2.1), it states there is 1) a source character set 2) an execution character set (5.1.1.2 clause 5): the source character set members in character - Mon, Nov 29 2004 7:30 pm 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e3ff05b73fece7ac How to write the code to realize itoa? - 1 new ---------------------------------------------- ...void itoa_1(int n, char *s) { int tenth, min_flag; char swap, *p; min_flag = 0; if (0 > n) { *s++ = '-'; n = -INT_MAX > n ? min_flag = INT_MAX : -n; } p = s; do { tenth = n / 10; *p++ = (char)(n - 10 * tenth + '0'); n = tenth; - Mon, Nov 29 2004 7:51 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/428e3216e9679ac6 [OT] Re: How do you read source for big programs? - 3 new --------------------------------------------------------- kj wrote: ... Even a relatively small program of a few hundred thousand lines is too complex to grasp "in detail," and understanding the entirety of medium and large programs requires shortcuts. The largest single program I ever personally worked on had grown to about three million lines by the end of my eleven years on it, and although - Mon, Nov 29 2004 3:11 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/ac7df4d68086f7cd sizeof error - 2 new -------------------- ...Object types have sizes. Strings have lengths. ...The length of a string does not include the null byte. The type of "\0\0\0\0\0\0" is (char[7]). sizeof (char[7]) is seven. sizeof "\0\0\0\0\0\0" is seven. strlen("\0\0\0\0\0\ 0") is zero. - Mon, Nov 29 2004 8:40 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7defe46e2ffed4e2 Effective Email Marketing - 4 new --------------------------------- Hi We offer you E-mail addresses databases (or called Bulk E-mail lists) for online advertisement. we provide you with a free list of email addresses you can use in your marketing campaign, or you can choose to buy larger inexpensive databases. Furthermore, you can download several online marketing softwares absolutely - Mon, Nov 29 2004 2:03 pm 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/eeeb6b5e43affdb8 What is const char * const *p; - 2 new -------------------------------------- Hello, I have few questions. They are: 1. Is "const char * const *p;" a valid construct? 2. How do I align a given structure, say, at 32-byte boundary? 3. Then, how do I assert that a given object is aligned, say, at 32-byte boundary? Regards, - Mon, Nov 29 2004 9:37 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/20b6af129c4730cd simple file system - 1 new -------------------------- I am continuing writing my simple file system and I have run across the following problem. I am writing a superblock to a certain frame in the file as follows: (&sb is the address of a superblock struct with size < FRAME_SZ * 4) . ..int frame = 3 ; struct superblock *sb = malloc (FRAME_SZ * 4) ; struct superblock *sb_echoed = malloc (FRAME_SZ * 4) ; - Mon, Nov 29 2004 11:29 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d6df105e8be7abd1 sizeof error - 2 new -------------------- Code: -------------------- void FullPath( char *newp, char *oldp, char *ext) { char *p = strchr( oldp, '.' ); if (p!=NULL) *p='\0'; snprintf( newp, sizeof( newp), "%s%s", oldp, ext ); } -------------------- where sizeof had reported 4. i could use strlen() instead but it is still going to truncate, but not as bad. i just have to add for the - Mon, Nov 29 2004 9:39 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c20b2ad1672a7be6 ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.c" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.c To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.c/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
