comp.lang.c http://groups-beta.google.com/group/comp.lang.c
Today's most active topics: * HP/UX Itanium C comiler & std C - 20 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d844682942ab73a2 * Learning C from old books ?? - 13 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/187ec3296ad0ead9 * Crazy stuff - 13 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3bdab6e630859d59 * Compiler warning level - 11 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d7360ceb0613160 * derangement: coding review request - 11 new http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63c5271ccb9149a Active Topics ============= strings - all new ---------------------------------- ... I like this. Is it what you get when Red Dwarf crashes? Richard ... - Mon, Nov 15 2004 1:09 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/898216cde1cc4f1b DOS to Windows - all new ---------------------------------- ... In Win9x, the whole "OS" is still built on top of (some kind of) MS-DOS. Cause creative enough Undefined Behaviour in a DOS application and you'll be able to crash the entire system. (I know; I've done it :-/ ) In contrast, in XP the command prompt is a separate application within Windows. Crashing an XP console box shouldn't crash the whole computer; it should merely lock it tight :-P Richard ... - Mon, Nov 15 2004 1:09 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/4ca2aabf9d2c03ad telnet - 4 new ---------------------------------- Hi, I want to make a program what connect through telnet protocol to a router, and run commands for configure the router. I read over sockets and I made the program above, but it don´t work fine. After this, I read document in Internet about this, and I believe that I have to implement the protocol. But I don´t know. Someone can help me. ... int main(int argc, char *argv[]) { int sockfd, numbytes; /* Contendra el numero de bytes recibidos despues de llamar a recv() */ int newfd; /* las... - Mon, Nov 15 2004 1:19 am 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e10de818da2a8bc2 C pre Processor - 4 new ---------------------------------- ... Header files generally shouldn't contain object definitions (though they may contain object declarations). There's nothing in the language to forbid it, but it's generally not a good idea. ... - Mon, Nov 15 2004 1:27 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/12f5bbcaf46968a Write a customized printf function in C - 5 new ---------------------------------- ... Yes. ... - Mon, Nov 15 2004 1:33 am 5 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/95e1d13f0e4e7417 The C language on Mars - 4 new ---------------------------------- ... Which is kind of surprising when you realize that "Space is big. Really big." Imagine how far off we'll be when we try to get to Betelgeuse... ... - Mon, Nov 15 2004 1:36 am 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/40888ed3d75514c8 Learning C from old books ?? - 13 new ---------------------------------- On Mon, 15 Nov 2004 06:59:49 GMT ... Mid-80's books are likely to be pre-ANSI since the ANSI standard came out in 89 You can generally recognise pre-ANSI stuff by the way functions are defined. The pre-ANSI form looks something like foo(bar,bob) int *bar; { ... The ANSI/ISO equivalent is int foo(int *bar, int bob) { return 0; ... As you (the OP) can see, the ANSI/ISO version has the variable types inside the parenthesis. There are other differences as well. ... OT Still: an easier way for a Windows person IMHO, especially one... - Mon, Nov 15 2004 1:37 am 13 messages, 9 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/187ec3296ad0ead9 comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) - all new ---------------------------------- Archive-name: C-faq/abridged Comp-lang-c-archive-name: C-FAQ-list.abridged [ Last modified July 3, 2004 by scs.] This article is Copyright 1990-2004 by Steve Summit. Content from the book _C Programming FAQs: Frequently Asked Questions_ is made available here by permission of the author and the publisher as a service to the community. It is intended to complement the use of the published text and is protected by international copyright laws. The on-line content may be accessed freely for personal use but... - Mon, Nov 15 2004 3:00 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a57b4e6fd7b09cce getting variable type in C - 10 new ---------------------------------- In article , ... Stick around for a bit, and you will come to understand more things about this very religious newsgroup. One of the fundamental tenents of this religion is that if it is not standard, it is *not C* (1). That is, the claim is not that it is merely "not standard C", but that it is not C at all. Bog knows what it is (for all they care, it might be Fortran or Frobozz or your left ear), but neither of the following are in any sense written or in any way related to... - Mon, Nov 15 2004 3:33 am 10 messages, 9 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3c5bebf4c0625e0b FBI turned AMERICA into a NATION of PROGRAMMED SLAVES and ROBOTS - all new ---------------------------------- Please save this column on your computers and email accounts and also forward this to all your friends, family, coworkers, democracy websites, civil liberties websites and as many americans as possible who are genuinely concerned about CIVIL LIBERTIES and FREEDOM in America. FBI turned AMERICA into a NATION of "PROGRAMMED SLAVES" and "ROBOTS" FBI is an ORGANIZATION of FUCKING CLOWNS, THUGS, CRIMINALS, RACISTS, TRANSVESTITES, EUNUCHS, SADISTS, PERVERTS, DICTATORS and MENTALLY SICK FUCKING TERRORISTS. FBI motherfuckers CREATED a BIG MAZE called... - Mon, Nov 15 2004 3:33 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/24ad66ee4a28ed3e ANN: xcpp C preprocessor now available - all new ---------------------------------- On Sun, 14 Nov 2004 14:48:09 -0800, Ben Pfaff ... Unless there are some C99 compilers out there without C99 libraries and headers. As I recall gcc (among others) has said that the library is not their responsibility, it's the responsibility of the OS to provide it. Or is that just the library object/ archive, and the headers are still the responsibility of the compiler? If it's guaranteed that a C99 compiler will include all of the standard headers, I can also use stdbool.h, which would be nice (of course, I... - Mon, Nov 15 2004 3:08 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7302d526ed70110a Compiler warning level - 11 new ---------------------------------- On Mon, 15 Nov 2004 03:05:48 GMT, pete ... I think that what "Old Wolf" meant is what I would prefer, that any signed type with a negative value would compare less than any unsigned value, which would make sense. Chris C ... - Mon, Nov 15 2004 3:11 am 11 messages, 7 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d7360ceb0613160 array subscripting - 4 new ---------------------------------- On Fri, 12 Nov 2004 12:42:38 +0000 ... Perhaps he confused it with structures, where, if i recall correctly, padding may occur. Greetings, Chris -- Christian Staudenmayer University of Ulm, Germany [EMAIL PROTECTED] ... - Mon, Nov 15 2004 4:24 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/818f1182b855b0ca HP/UX Itanium C comiler & std C - 20 new ---------------------------------- While porting our application to HP/UX 11.23 Itanium, I came across this situation where the compiler acts differently to any other UNIX C/C++ compiler that I have come across in the last 10 years (including other HP-UX platforms). Consider the following code: ... int main() { char *ptr = "AB"; . .. ans = (*ptr++) ? ptr : ""; printf ("Answer is %s\n", ans) ; return 0; ... When running this, I would usually expect to see: Answer is B On Itanium it displays: Answer is AB There are a few HPUX compilers to choose from... - Mon, Nov 15 2004 5:16 am 20 messages, 10 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d844682942ab73a2 Get array size by a pointer dynamically - all new ---------------------------------- ... In C main returns int. ... In C a pointer doesn't know anything about the size of an array it is pointing at. This is fundamental and means that even various standard library functions that need to know the size of an array require you to pass that size (e.g. fgets()). So the direct answer to your question to your question is that you can't. As others have said there are various techniques to work around this, e.g. putting a marker in the array data or maintaining a size variable alongside the pointer. And this is an issue... - Mon, Nov 15 2004 5:34 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/966fa4ec6ef0ce84 derangement: coding review request - 11 new ---------------------------------- At the risk of developing a larger reputation as a dullard, I would like to continue this discussion at a level that I can understand. The following code, I believe, produces exactly the behavior--with good style--that we're looking for from K&R2 §5. ... int main(void){ int a = 3; int b = 5; swap(&a, &b); printf ("a equals %d\n", a); printf ("b equals %d\n", b); return 0; ... int tmp = *px; *px = *py; *py = tmp; ... Q1) Does anyone think that this is lacking in any fashion? Q2) If prototype and declaration are not the... - Mon, Nov 15 2004 5:40 am 11 messages, 6 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63c5271ccb9149a noop comparator for qsort - 3 new ---------------------------------- ... ... ... yes ... Always returning 0 creates a valid ordering relationship - all elements compare equal, which is quite possible in real data. ... Always returning 1 is invalid because compar(a,b) == -compar(b,a) is violated. AFAICS always returning 0 is the only way to create a valid comparison function without examining at the data. Lawrence ... - Mon, Nov 15 2004 5:49 am 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/38fc202bbe7f8457 char array initialization: Is 'char a[] = ("a")' valid ANSI C? - 3 new ---------------------------------- On 3 Nov 2004 13:53:44 -0800, Old Wolf ... Oh, I don't pronounce it as two words except in fun (like "cow orker" for "coworker". But I read it and internalise it as two words, then have to put them together to get the meaning. My natural language parser is not very sophisticated, and frequently breaks on things I say let alone input from other people (I got it cheap from a government surplus store 48 years ago and can't get the memory to upgrade it).. . (I also use 'squiggle' for the bitwise 'not' sign...)... - Mon, Nov 15 2004 5:44 am 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2f5945f014c2cbd0 nonzero != 1, right? - 11 new ---------------------------------- ... ... ... But there is a different problem. The standard doesn't require that UINT_MAX be larger than INT_MAX, they can be equal. In that case pairs of signed int values (one positive one negative, and maybe INT_MIN,0) will map to the same unsigned int result. This could result in the code flagging numbers as equal when they are not. Lawrence ... - Mon, Nov 15 2004 6:58 am 11 messages, 8 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/26814eeabc379360 Arraym malloc() and free() question - 4 new ---------------------------------- ... However this isn't portable. C90 6.1.2.6 says: "All declarations that refer to the same object or function shall have compatible type; otherwise the behavior is undefined. And C90 6.5.4.3 says for function declaration compatibility: "If one type has a parameter type list and the other is specified by a function declarator that is not part of a function definition and that contains an empty identifier list, the parameter list shall not have an ellipsis terminator and the type of each parameter shall be compatible... - Mon, Nov 15 2004 7:38 am 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/6c0e0b0f81ee43bf Obfuscate C tricks - 3 new ---------------------------------- ... when(a) ZAP(a); if(x EQ 40) then test val_a 20; end More fun is also to encode strings, and do hell of a job decoding it. ... _a_(a_o(i,n),a_o(m, a))(__o,O,__){if(++__==_-26||__--==_+2)(_) a if(__==_+8||__==_+((O=26)-5)) a_o( (_n_(_+11)),a if)((o)>7)a_o_(_n_(o+O-24))a _a_(a_o(i,n),a_o(m,a)) (__,O,_n_(a_ o(o,__)[o++]))a} ... - Mon, Nov 15 2004 7:54 am 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/20eafe92fac9409c regexp confusion - 4 new ---------------------------------- What do most of the experienced programmers here do when they encounter a situation, constrained to a C programming env obviously, where they could use a regexp system? I find the regcomp(), regexec(),system a little unwieldy, especially when dealing with user inputted expressions. Is there example code someone can point me to as a howto on dealing with regexp issues? ... - Mon, Nov 15 2004 8:07 am 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/878500f224a7501c Modify Static Data Okay? - 2 new ---------------------------------- In article , ... And "static" doesn't mean "unchangeable". (Amusing how those two misconceptions have run through this thread) ... - Mon, Nov 15 2004 8:28 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/38a3bbbb875bc9ac Crazy stuff - 13 new ---------------------------------- ... ... ... Well, the 6502 processor, which certainly does have C compilers targetting it, has a 256 byte processor stack. I suspect the C compilers don't use that to hold automatic variables. Lawrence ... - Mon, Nov 15 2004 9: 51 am 13 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3bdab6e630859d59 Thanks. C source included. - 3 new ---------------------------------- Thanks, Michael, please the see the following: ... ... ... ... any warning or error. NOTE: it is not the contents of "unacked_cb" gets changed, but the pointer itself gets incremented unexpected. I tried: retran_unacked(RRR_SENT_ UNACKED_CB * const unacked_cb CCXT_T CXT) without any warning with compiler. . .. The problem here is that unacked_cb is a pointer pointing to a dynamically allocated memory and there many such pointers. Before the problem occurs, I don't know which one will have the problem. Therefore, it is not possible... - Mon, Nov 15 2004 10:45 am 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/40901c21e3f7e563 project doubts please ! - 6 new ---------------------------------- project doubt 1) ping all defined machines in the network from time to time, and alert (by an indicator on a web page or screen) when some machine is down ( 2) periodically check HTTP and FTP ports of important machines (like your intranet server) to verify that services are running and responding properly ( 3) can check if there is any networking problem like ping delay or HTTP server responding slow (4) sysadmins can add custom service ports (other than HTTP/ FTP) to their checklist (5) your application will then check if those... - Mon, Nov 15 2004 11:15 am 6 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b6698b48d62ed6bd defining wide-character strings with macros - 8 new ---------------------------------- Hi, In ISO C/C++, a string constant prefixed by the letter `L' is a wide string constant and is of type "array of wchar_t". Consider the following C program fragment: ... { const wchar_t* my_string = L"a"; wprintf(my_ string); return 0; ... This compiles fine (and even seems to work). Now, suppose that "a" is defined through a macro (presumable in another source file) : ... QUESTION: How does one define a wide-character string based on `STRING_ LITERAL'? Naturally, this fails miserably: const wchar_t* my_string = LSTRING_LITERAL;... - Mon, Nov 15 2004 12:11 pm 8 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/b199760e29546df0 Directory/File recursive listing using standard/portable C? - 6 new ---------------------------------- Just curious: is it possible to recursively list all the directorys/files inside a given directory using standard c i/o library routines only, which can be re-compiled and run on any os supportes c compiler? Or this is too os dependent, system-specific functions must be called? I think about this when i tried to do this under windows, i found in order to achieve this, some windows- specific api such as FindFirstFile, FindNextFile must be used, so anyway not using them? Forgive my poor English, Thanks in advance.... - Mon, Nov 15 2004 12:19 pm 6 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/6bb13eb49896e55a Unions and portability... - 3 new ---------------------------------- Hi all, Consider a function which gives huge number of datum in the form of array. I know how the data is arranged in the array (i.e. what index stores what data). void foo( int32 *data); The parameter I am passing to this function is an array declared in union and the other element in the union is the structure which contains the list of all the data. typedef struct { int32_t i1; /*Index 0*/ real32_t r1; /*Index 1*/ char string[4]; /* Index 2*/ ... typedef union { real32_t name_strg_data[MAX_NS_DATA];... - Mon, Nov 15 2004 1:54 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/1536c4a3cc999f3 has anyone followed sedgewick's "algorithms in c parts 1-4"? - all new ---------------------------------- ... I have Part 5 only. I agree, that the algorithms are not complete. I had to fill the missing parts myself. This forces to actually understand the book, istead of just coping the code. ... - Mon, Nov 15 2004 4:28 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/33d33976ce524504 COMP3 Packed Decimals - 5 new ---------------------------------- Hello, I need to write a program that includes converting ASCII integers to COMP3 (Packed Decimal) format. Does anyone know of any C sample code on converting integers into COMP3 format? Thanks in advance. Rob ... - Mon, Nov 15 2004 4:36 pm 5 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7cc0d788ae29187 Golf Competitions - all new ---------------------------------- ... Fragesteller: The person who asks a question and is forbidden from answering it himself, else said question is rhetorical. MPJ ... - Mon, Nov 15 2004 5:58 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/55b43d0bd0d44eb How can I get a name of function running currently. - 3 new ---------------------------------- Hello, I want to know the name of function() in program. In "gcc", I know that __FUNCTION__ macro is used for getting that. but in "cc", __FUNCTION__ macro does not exist. I can't find function to get the name of function running currently. Could anybody help me? Thanks. ps. OS is SunOS 5.8 Regards. ... - Mon, Nov 15 2004 6:15 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a6eb72d4e454020e How does C cope if architecture doesn't address bytes? - 4 new ---------------------------------- ... There's a couple of solutions that have been used (by compilers): 1. Fake 8 bit bytes, with a performance penalty. Couple loads and stores with the appropriate mask and shift instructions. Do some similar magic for pointers to char and void (which must have identical representation). 2. Define CHAR_BIT to the architecture's smallest addressable unit. For example, on some DSP implementations, char, short, and int are all 32 bits. The choice between the two may be configurable via command-line switches ... - Mon, Nov 15 2004 8:58 pm 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/30200c2a3cb93e0a homework problem - all new ---------------------------------- ... I must disagree with some that the function *plonk* in c is defined when preceded by _leroy . As far as I'm concerned, Joona, Old Wolf and Mr. McIntyre hit the fairway off the asphalt. They have birdie oppportunities. In case no one wants to answer the OP's q then I shall be only too happy to write Herrn Schroeder a check for five bucks. ... een yuter. MPJ ... - Mon, Nov 15 2004 10:32 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a6d5cc60dffdcbfd Sprase matrix - 2 new ---------------------------------- ... A sparse matrix is a matrix whose entries are mostly zeros. You add a sparse matrix like a regular matrix--element by element: for i=1:n for j=1: n ... end Of course, the representation of a sparse matrix is usually some sort of other datastructure holding the (x, y) coordinate and the entry. You can use a linked list, if you'd like, although a hashmap with an iterator would be better.... - Mon, Nov 15 2004 11:00 pm 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/6cb646efd59ed710 Bitwise idioms - all new ---------------------------------- ... <snip> ... All bits are ordered starting with 0. Some superfluous parenthesis have been added, in some of the examples below. unsigned int x = 0; /* Always use unsigned types! */ x |= (1U << 3); / * Set bit 3 */ x |= (1U << 4 | 1U << 5); /* Set bits 4 and 5 */ x & = ~(1U << 4); /* Clear bit 4 */ x &= ~(1U << 3 | 1U << 5); /* Clear bits 3 and 5 */ x ^= (1U << 6); /* Toggle bit 6 */ x ^= (1U << 7 | 1U << 8); /*... - Tues, Nov 16 2004 12:06 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a3e4be9ced83cea7 Simple vsscanf source code - all new ---------------------------------- Hello, I realize that the source code for vsscanf is available from several sources, such as GNU. However, all such source code I've found so far is filled with cryptic (to me) #ifdefs, system stuff, and basically all kinds of general things related to a particular implementation. I'm looking for a simple concise generic C99 version that I can easily adapt into my application without having to look all over the place for a seemingly unending litany of cryptic "helper" functions. I'm sure I could write my ... - Tues, Nov 16 2004 1:39 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a30eda8520eca98b Giving the preorder & inorder lists, How can be constructed the corresponding B-TREE ? - all new ---------------------------------- In article , ... Read the code more carefully. Note that where the pointers are pointing is more important than what they're called in determining what data structure they represent. dave ... - Tues, Nov 16 2004 1:40 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/68744af9e196542d Learning C with Older books ?. - 2 new ---------------------------------- Hi all,Just wondering are there any problems with learning c from older books, as I have picked up some from 1988,1994,1997,1998. By using books of this age( Im on a tight budget)am I going to missout on anything in the langauge or has C remaind similar. I intend to use Dev-C++ on the windows platform. If any one feels theres anything I should be aware of,please help me out,I feel a bit lost with all thats out there regarding this language. Many thanks. ... - Tues, Nov 16 2004 1:40 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/66bc74d8d8d22b33 Is this legal ? - all new ---------------------------------- ... ... http://www.gotw.ca/gotw/081.htm This article is about C++, but I guess it applies to C in a large part as well. It shows that direct or indirect object access semantics wrt "const" is the same in both languages - what is really important is the constness of the object itself (whether " natural" or by definition). All other "const" issues (and differences) are in the type system and don't affect object access as such. The article gives reasons why a compiler does not assume anything about a non-const object value when you pass... - Tues, Nov 16 2004 3:13 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/dbe05ac54921bc92 const members - 6 new ---------------------------------- 1. If I have a struct type which contains a const member: struct mystruct { const int id; int mutable; ... struct mystruct ms; define an object `ms' which is *partly* const? Ie. the object `ms' is not const as a whole, but modifying ms.id yields UB in all contexts? 2. Provided the answer to the above question is "yes" (ms.id is really a const (sub)object), would the below code work: struct mystruct_without_const { int id; int mutable; ... struct mystruct *new_mystruct(void) { struct mystruct_without_ const *msp;... - Tues, Nov 16 2004 3:39 am 6 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/193c2f433670ba08 Newbie: Output to a file - all new ---------------------------------- ... Hello, See comments embedded in code. ... missing non standard header files such as ... Should be fd = open(IN, O_RDONLY); Or you could use fopen() and getc() with better luck. given the proper flags (-Wall -O) gcc would have complained that you call open() without proper declaration first and had you included unistd.h, gcc would have complained about the argument type mismatch. Instead, it passes a pointer as the second argument, and open interprets that value as a combination of bits. Open may fail or succeed in unpredictable... - Tues, Nov 16 2004 4:14 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cafbf0aedb5969fa How To Reduce Number Files by Putting file1.c and file2.C Together - 2 new ---------------------------------- Hello, I have a program that can be compiled and run on SGI and Linux computers, and only one of the files in the program has is different. On the SGI system, the file has a dot capital C suffix, and on Linux it has a dot lower case c suffix. When I put both files in one file and surround them with precompiler directives such as #if SGI ... #elif LINUX ... #endif, the compiler complains when it includes other files. How can I get it to compile and run on both computers? Thank you, Christopher M. Lusardi... - Tues, Nov 16 2004 4:23 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/321565648643f287 developing c code to access partition table - 2 new ---------------------------------- i want to develope the c source code to access the linux partitions from the windows. i have accessed the MBR and promary partition table. But i am not able to access the extended partition tables through c code. please kindly help me in this scenario. ... - Tues, Nov 16 2004 5:19 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a024384dce1a749 how to read source code? - 2 new ---------------------------------- Hi, I am learning some code reading techniques for source codes written in C or C++. Could anybody give me any suggestions on how I can learn those techniques? Any book suggestions or info about good tutorials on web sites are appriciated. Thanks a lot in advance. ... - Tues, Nov 16 2004 5:38 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2fae81325e990c2 unanswered questions - 5 new ---------------------------------- In the past weeks I asked two questions concerning unions, and I got not a single reply to either. What should I do next? Re-post them? Ask them again in csc? ... - Tues, Nov 16 2004 5:53 am 5 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7d3a6e6860d3c3b5 programming a network adapter - 2 new ---------------------------------- hello i have a little difficult problem searchengines could not help me yet i have 2 zigbee (standard for wireless personal area networking, such as bluetooth) cards, connected to the pc's via usb now i'd like to programm (in C or C++) a network adapter to manage a TCP/IP connection over my cards (under windows 2000) i have a library with routines for sending data with these cards but i couldn't find anything about programming a network adapter so that i can send the tcp/ip packets from this adapter over my cards ... - Tues, Nov 16 2004 6:24 am 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3e5313c39b61d778 Definition of NULL - 8 new ---------------------------------- I've been reading this newsgroup for some time and now I am thoroughly confused over what NULL means. I've read a NULL pointer is zero (or zero typecast as a void pointer), others say it's compiler dependent (and that NULL might be anything, but it is always NULL). The source snippet is below. The question is: - When I use calloc to allocate a block of memory, preinitialising it to zero, is this equivalent (and portable C) to iterating through the structure 128 times setting the individual elements to NULL (i.e. is ... - Tues, Nov 16 2004 9:47 am 8 messages, 7 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/6c604861d0d193ac Handling text with C? - 3 new ---------------------------------- Is there any convenient way to program text-handling routines in C? For example, I have a text file and I want to remove every other line, and then write the output. Or should I read tutorials about string fuctions and exercise to become an expert in: for (i = 0 ; i < sz ; i++) printf ("%c", buf[ i]); ...... - Tues, Nov 16 2004 10:56 am 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/fc662b477263b5f6 seems OT; will demonstrate relevance - 6 new ---------------------------------- Elsethread is a discussion of identifiers. How many times have you had to wipe out a HD and start over. I just thought of a way to keep gcc running all the time here, but I've forgotten my abra cadabras over the years. I need the statments for autoexec.bat and config.sys in order to load mscdex.exe. (I know the question in its sheer temerity looks OT. Give me a little rope. MPJ P.S. Allegro ... - Tues, Nov 16 2004 12:01 pm 6 messages, 4 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/909d9b0c9ff87435 >>> TERRORIST AND EVIL ANGLO-SAXON RACE AND RELIGION <<< FACTS YOU WONT HEAR - all new ---------------------------------- ... BASTARD, FIRST PAY THE INDIANS, THE REPARATIONS FOR THE LAND THAT YOU STOLE AND THE AFRICAN AMERICANS THE REPARATIONS FOR STEALING THEIR LIBERTY, KEEPING THEM IN CHAINS IN ANIMAL BARNS, RAPING THEIR WOMEN, AND RIPPING THEIR SKIN BY FLOGGING WITH WHIPS. THE MOST EVIL RACE AND RELIGION IS THE ANGLO- SAXON RACE AND RELIGION - ALWAYS AFTER THE RESOURCES, FREEDOM, LABOR OF ONE RACE OR ANOTHER - BY BUILDING ALLIANCES OF ROBBERS, MURDERERS AND THUGS. THE ANGLO-SAXON RACE AND RELIGION IS THE MOST EVIL : (1) ORGANIZED BRUTAL FARM SLAVERY OF BLACKS... - Tues, Nov 16 2004 2:32 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/695b63ba9e4b458f C/C++ code beautifier - 11 new ---------------------------------- Hi all! Is there a linux tool that uses as input my ugly C/C++ code and outputs a pretty and nice formated source code? Regards, Diego ... - Tues, Nov 16 2004 3:17 pm 11 messages, 9 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/acd7f8376b921f9 47270 Mining the Web: eigenVectors, Kriging, Inverse Distance Weighting Searches 47270 - all new ---------------------------------- Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences, engineering, aerospace, astronomy, photography, news, computers, software,... - Tues, Nov 16 2004 2:01 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8b7589eed19e6031 memory drawings in C [OT] - all new ---------------------------------- Is it better to draw a memory drawing to go through a C program which involves lot of pointers and data struct. I tried but I am getting stuck when things are getting complicated. I tried with Minix Os source code to *visulize* the flow of the variable but it was too complicated. Am I wasting my time in this way of going through a C program or is it a good practice. -- "Combination is the heart of chess" ... sathyashrayan25 AT yahoo DOT com ( AT = @ and DOT = .) ... - Tues, Nov 16 2004 5:47 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/20e31f0989ef64c2 Subtracting 0 from one-past-end pointer - 7 new ---------------------------------- For the following code: int main(void) { ... a runtime bounds-checker I use gives an error "Pointer underrun" on the ptr -= 0 line. Is there something wrong with that statement? ... - Tues, Nov 16 2004 6:05 pm 7 messages, 5 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9a63ee6543fd5f1f Value of uninitialized char - all new ---------------------------------- Groovy hepcat Christian Staudenmayer was jivin' on Sun, 14 Nov 2004 22:50:07 + 0100 in comp.lang.c. Re: Value of uninitialized char's a cool scene! Dig it! . .. No it won't. It will have static duration. But it will not be "a static variable". Indeed, if declared with any qualifiers (except typedef) it will be an object with static duration. But that does not make it a static qualified object (unless, of course, it is declared with a static qualifier). It's just a nitpick; but let's get our terminology straight so we... - Tues, Nov 16 2004 7:46 pm 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2747210e72381d9b how to hide characters on screen - 3 new ---------------------------------- Hi, Can someone guide me as to how I can modify the code below to hide characters from displaying on the screen as they are entered? If there is a better way of achieving this, please let me know. I'm running this on unix ( Solaris8). thanks. ... int main(void) { ... ... - Tues, Nov 16 2004 8: 18 pm 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/1393248de2676885 text fixed with graphics and eqations - all new ---------------------------------- Hi, I'd like to pu text fixed fith graphics and equations onto some control. And I don't know which one. I tried to use TRichEdit but its doesn't show graphics and eqation. How can I show these elements. It's best resolve for me. I thought that HTML format is good resolve as well(without equations, can be with??) but I don't know which control should I use to show HTML page. Links, documentation, anything Thanks for any suggestions SJ ... - Wed, Nov 17 2004 12:12 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/6ba5480a906ffd21 C = only language that easily deals with shared mem. access ? - all new ---------------------------------- Hi, I've been searching for a few days which languages allow to access zones of the shared memory, and the conclusion is that C's (& C++ I guess) are the only one that permits that isn't it ? (in fact I've only checked Java, Perl and Python) The IPC::Shareable API in Perl doesn't look like it's widely used, in Java there's nothing, the same in Python. Am I mistaken ? Thanks. Spendius ... - Wed, Nov 17 2004 12:17 am 1 message, 1 author http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3eef7c0d54d7ae47 ======================================================================= 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
