/ | \ -------------------------------------- Internet: Auke.Reitsma@net.hcc.nl FidoNet: 2:281/400.20 --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200015 Date: 01/31/98 From: AUKE REITSMA Time: 08:01pm \/To: ALL (Read 1 times) Subj: [1/2] The Rules NOTE: Changes are denoted by "|" in the leftmost column. C_ECHO CONFERENCE RULES May 1997 1) Scope The C_ECHO is an internationally distributed FidoNet echo for the discussion of the C language, C programming and related subjects. 2) Language The official human language of this echo is the English language. The primary reason for the echo is public discussion, so ENCODED messages are not permitted. This prohibition includes the posting of UUEncoded files. 3) Etiquette Be considerate of your readers. Reread your posts, correct your spelling and attempt to make your point clearly and succinctly. Nationalistic, religious, political, unethical and immoral statements shall not be made, either within messages or in taglines. See "General Rules" below. Show respect towards the person to whom you are posting. Make your point, agree or disagree, without being rude or provocative. If you can't post without abuse, then just don't post. 4) Messages/Replies * All messages posted in the echo are expected to comply with the FidoNet message requirements. Origin lines should be no longer than 79 characters. Messages should not contain hi-bit characters with the exception of soft CR's ( '\x8D' ). Due to this echo going to multiple zones, please include the zone number in your origin line FidoNet address. * Despite messages carrying a single recipient's name, all messages posted here are available for all to read. Do not hesitate to answer a message to someone else if you think you have something worthy to say. By the same token, do not be offended if several people comment on your post to another individual. This is a public forum. * MESSAGES WITH THE PRIVATE ATTRIBUTE ARE NOT PRIVATE. They are publicly seen by all and are subject to the rules of the echo. * Do not respond to off-topic messages in the echo. If you wish to respond, please do so by netmail or email. If you are in doubt, then email the moderator and ask. * "Thank you" and "no content" messages are a waste of echo bandwidth and not usually of interest to the echo. Please refrain from them. Similarly, on-topic comments to several respondents should either be done with a single message addressed to them all or via netmail or Internet email. * When replying to a message, it is preferred that you: 1) Quote some of the original message so the recipient (and others as well) will know what you are talking about. 2) Be selective when you quote (5 to 20 lines is recommended) and *NEVER* quote an entire message and just add a line or two. 3) Do not quote control (^a or "kludge"), origin, tear or seen-by lines. It is considered abusive of the sysops who pay to carry this forum around the world and rude to the participants of this echo who must wade through useless quote lines. 5) Topic * The basic criteria for messages entered here should be: Is this message about C programming? Is this message of general interest to the echo? * Humor (in good taste) will always be considered on topic. * Wandering a bit off-topic in a reply thread is OK provided you are aware that this should not be abused. * Primarily, the focal topic of discussion in the C echo forum is C language programming with the following exceptions: 1) Ancillary subjects that facilitate or support C programming will be considered on-topic until the discussion ceases to be productive or of general interest. 2) Platform-specific discussions will not be allowed unless they pertain to the use of the C language. 3) Discussion of C programming for illegitimate reasons (viruses, crashware, etc.) is not permitted for the obvious liability potential. * C AND C++ ARE DIFFERENT AND DISTINCT LANGUAGES irrespective of what your compiler calls itself or what languages it supports. 1) A number of features of C++ are unrelated to object-oriented programming and are generally considered to be part of the "C++ as a better C" model. Some of these features are being discussed as additions to the ANSI/ISO C standard, therefore limited discussions of such issues will be considered on-topic in the C_Echo. Examples include function overloading, const semantics, location of declarations within code, and compatible standard library extensions. 2) If you post questions specific to object-oriented programming in C++, then expect to be asked to move your discussion to the C++ echo. C++ code will be allowed to be posted only when it happens to be the context for a question or problem which will result in a standard C solution as interpreted by rule #1 above. 3) There is a C++ echo and a clear distinction exists between the echos which is the reasoning behind keeping the contents of the echos different. The rule of thumb is that if your question involves any of the keywords of object-oriented programming, it belongs in the C++ echo. --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200016 Date: 01/31/98 From: AUKE REITSMA Time: 08:01pm \/To: ALL (Read 1 times) Subj: [2/2] The Rules * A list of backbone echos which are available for topics related to C follows and it is highly recommended that pure discussions of these topics be taken to the appropriate echo: C_PLUSPLUS C++ language/programming discussion ECPROG General programming 80XXX General assembly language programming OS2PROG OS/2 programming DR_DEBUG General computer and programming discussion EMBEDDED Programming processors in dedicated systems GAMEDEV Discussions of sound, graphics, and other design and development topics useful in game programming. 6) Moderation The C_Echo is a moderated EchoMail conference. The Moderator is chosen by a general election annually. The Principal (elected) Moderator may choose to appoint Zone Moderators to assist in moderating message in specific FidoNet Zones. The Zone Moderators will be responsible for carrying out the duties of the Moderator, as designated by the Principal Moderator and subject to peer review procedures, as specified by the Principal Moderator in their respective zones. Note that the Zone Moderators are appointed by the Principal Moderator who remains responsible for overall C_Echo moderation and who is solely responsible for who is assigned as a Zone Moderator as well as the tenure of Zone Moderators. 7) General Rules * LEAVE MODERATING TO THE MODERATOR. If something in the echo irritates you, send me a message via netmail or Internet email. If you don't know how to send netmail, ask your sysop. * NO FLAMING. Inflammatory messages are not permitted. If you feel you have been insulted in some way, there are three options: 1) Complain to the person via netmail or Internet email. 2) Bring the matter to the attention of the moderator by netmail or (preferred) Internet email. 3) Ignore it. * EXCESSIVELY ANNOYING BEHAVIOR IS FORBIDDEN. As moderator, this is a judgement call for me. In general however, if a message or thread annoys a significant number of participants of the echo, it will be deemed excessively annoying. If you see something that you feel is annoying behavior, feel free to contact me via one of the methods listed below. * Code posted in the echo should be free from copyright restrictions. It is preferable that code come with a public domain notice, but copyrighted code with a license for unrestricted use in personal and commercial applications will be allowed. An example public domain notice: /* Gamma Ray Detection Routine - written by: E. Fermi */ /* Released to the Public Domain 1992 */ An example copyright notice with license: /* Copyright 1987-1989 by Robert B. Stout dba MicroFirm */ /* This code may be used freely in any program for any */ /* application, personal or commercial. */ * Commercial advertisements, including job openings, are banned from the C_echo. Non-commercial ads (e.g., for BBSes) are allowed exactly once. Informational product announcements (i.e. hype-free) are allowed exactly once. * There is no official FAQ list for the C echo. However, try to locate a copy of SNIPPETS on a local BBS and see if there isn't something that corresponds to the problem/question you have. Do not be surprised if your questions are answered with "look in snippets" or something similar. * This is not an exhaustive list, but given what *is* off-topic, it should be easy to tell if something not mentioned would be considered off-topic or not. * If you are asked to stay on-topic, please take it as that and not a personal attack. It is only done to keep the forum on-topic for the sake of all readers and the hundreds of sysops and users paying to carry it around the world. Don't take an off-topic warning as being anything more serious than what was intended. * The C_Echo is neutral territory. *Inflamatory* nationalistic, political, and/or religious issues have no place in C_Echo messages or tag lines. While freedom of expression is respected, consideration of opposing views will be enforced, e.g. Inflamatory tag lines: "The only good Indian is a dead Indian!" Gen. Phillip Sheridan "Have you killed a Christian today?" Coridon Henshaw "Vote [for/against] [whatever/whoever]" Non-inflamatory tag lines: "Proud to be an [American/whatever]" "Read the [Bible/Q'ran/whatever]" "Kiss me, I'm [Irish/whatever]." * In disputes which may arise, the moderator's word is final. Comments and suggestions regarding the conference and/or its rules are always welcome. Please use Internet email to contact me if possible: FidoNet Netmail is slow and not too reliable ... The C_echo Moderator _____ /_|__| Auke Reitsma, Delft, The Netherlands. / | \ -------------------------------------- Internet: Auke.Reitsma@net.hcc.nl FidoNet: 2:281/400.20 --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200017 Date: 01/31/98 From: AUKE REITSMA Time: 08:01pm \/To: ALL (Read 1 times) Subj: What is Snippets? The SNIPPETS archive contains public domain/freeware portable C/C++ source code & instructional text. ~700 files, including: Approx. 70,000 lines of code + approx. 22,000 lines of tutorials. Approx. 30% PC-specific, 70% portable Approx. 10% C++-specific, 87% C/C++, 3% assembly, AWK, make, etc. The PC-specific functions are system-level utility code - no multimedia or GUI code. Tested on all popular PC compilers plus Unix compilers where possible. An eclectic collection with everything from macros to complete cut- and-paste C/C++ code solutions & utilities, along with FAQ and instructional files. To be included, files must: 1) answer a "how do I..." C/C++ question, 2) be clever, or 3) present a solution to an obscure but knotty problem. The current version is SNIP9707.xxx (where "xxx" may be LZH, ARJ, ZIP, TAZ (tar.Z) etc.), is ~950K, and is widely available, are are previous versions. Beginning with the December '92 release, SNIPPETS has had a companion SNIPDIFF archive which contains only the changes/additions since the previous SNIPPETS release plus DOS utilities to create a fully-validated copy of the current SNIPPETS release from a virgin copy of the previous release. The current version is SNPD9707.xxx, and is ~115K. Beginning with the November '96 release, a text-mode SNIPPETS browser and viewer is available. It comes with complete source and includes precompiled verions for DOS and OS/2. The archive name is SNIPVIEW.xxx, and is ~57K. Fidonet locations to get SNIPPETS (for FidoNet file requests, the magic names "SNIPPETS" and "SNIPDIFF" may he used to obtain the latest versions from many BBS's): 1:106/2000 1:11/70 1:2320/38 - home of FidoNet Programmer's Distribution Network (PDN) Other PDN sites Internet locations to get SNIPPETS and SNIPDIFF via anonymous ftp: snippets.org /pub/snippets (.TAZ (tar.Z) available) (This is the official SNIPPETS Internet distribution site.) connectn.acs.niu.edu /bbs/rbbs-pc/ra/files/c juge.com /c/file/c ftp.funet.fi /pub/msdos/Simtel/c (Europe) ftp.microdot.com.au /pub/snippets (Australia) ftp.simtel.net /pub/simtelnet/msdos/c (also Simtel CD-ROM) World-Wide Web sites http://www.snippets.org (This is the official SNIPPETS web site home page) http://www.strangecreations.com/strange/library/snippets.htm http://src.doc.ic.ac.uk/packages/simtel-msdos/c/ (Europe) Places that may also have SNIPPETS: Bix page 1445 in the programming RT Compuserve GEnie America Online numerous BBS's around the world --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200018 Date: 01/31/98 From: AUKE REITSMA Time: 08:01pm \/To: ALL (Read 1 times) Subj: Where to get Snippets The file name of the current SNIPPETS is SNIP9707.xxx, where xxx=ZIP, LZH, RAR, ARJ, TAZ (tar.Z), TGZ (tar.gzip), etc. The current SNIPDIFF is SNPD9707.xxx. Also available is a text-mode browser/viewer with complete portable source and precompiled versions for DOS and OS/2 - get SNIPVIEW.xxx. Fidonet locations to get SNIPPETS (for FidoNet file requests, the magic names "SNIPPETS" and "SNIPDIFF" may he used to obtain the latest versions from many BBS's): 1:106/2000 1:11/70 1:2320/38 - home of FidoNet Programmer's Distribution Network (PDN) Other PDN sites Internet locations to get SNIPPETS and SNIPDIFF via anonymous ftp: snippets.org /pub/snippets (.TAZ (tar.Z) available) (This is the official SNIPPETS Internet distribution site.) connectn.acs.niu.edu /bbs/rbbs-pc/ra/files/c juge.com /c/file/c ftp.funet.fi /pub/msdos/Simtel/c (Europe) ftp.microdot.com.au /pub/snippets (Australia) ftp.simtel.net /pub/simtelnet/msdos/c (also Simtel CD-ROM) World-Wide Web sites http://www.snippets.org (This is the official SNIPPETS web site home page) http://www.strangecreations.com/strange/library/snippets.htm http://src.doc.ic.ac.uk/packages/simtel-msdos/c/ (Europe) Places that may also have SNIPPETS: Bix page 1445 in the programming RT Compuserve GEnie America Online numerous BBS's around the world --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200019 Date: 02/01/98 From: MICHAEL STAPLETON Time: 4:57 am \/To: NEIL HELLER (Read 1 times) Subj: Re: WARNING MESSAGE - 2 -=> Quoting Neil Heller to All <=- Hi Neil, NH> Given the following code: NH> void NH> foo(void) NH> { NH> unsigned char foo = 'z'; NH> foo = foo >> 3; /* warning on this line */ NH> } It doesn't matter here, but if the function were recursive, you'd have big problems, using a local variable with the same name as the function. NH> The warning I receive is that the line of code above involves NH> "conversion between integral types". However, if I write the NH> offending line as: NH> foo = (unsigned char)(foo >> 3); NH> I don't receive the warning messages. Why is this? Let's look at (foo >> 3). When you use an unsigned char like foo in an expression it gets promoted to signed int by the integer promotion rules. The constant 3 is also a signed int, which makes signed int the type of the whole expression. Even though it's obviously safe in this case, stuffing a signed int into an unsigned char is an unsafe conversion in general as it may lose bits, so the compier generates the warning for the assignment, unless you cast the expression. For further info, see K&R2 p.197-198. PS. You might find this macro useful in suppressing warnings about unused parameters: #define unused(x) ((void)(x)) However, some compilers may choke on the (void). Michael Stapleton of Graphic Bits. * AmyBW v2.10 * ... This tagline is encrypted --- AdeptXBBS v1.11z (FREEWare/2) * Origin: Mach One BBS (3:713/615) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200020 Date: 02/02/98 From: JOHN DUMAS Time: 02:29pm \/To: ALL (Read 1 times) Subj: Re: DLL's Same category different subject: I have been making ( C ) dlls to pass into VB. For the most part I have had success. passing bytes back and forth. The only way I have passed character arrays is one byte at a time. Which of course works but seems very unprofessional. I have tried passing by character arrays by reference but, have only recieved "y|||||yyy||" garbage when back in VB. I have allocated memory to strings and tried again. But, I still have not had much success. If someone has a small example of a C string passed to a VB array I would like to look at it. ... Careful. We don't want to learn from this. --- Blue Wave/DOS v2.20 [NR] * Origin: The Witch City BBS *Salem,MA [978]745-1689 *Hayes 28.8 (1:101/301) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200021 Date: 02/02/98 From: JOHN DUMAS Time: 02:52pm \/To: ALL (Read 1 times) Subj: dll allocation madness I have been making C dlls for Vbasic and having some success but just because something works does not make it right. So, The confession. I have been leaving little bits of non-deallocated memory lying around due to the following "reason". I am making a ( char * ) function. which wants me to send back a ( char * ) not a char[ ]. I am calling this function from the other program repeatedly. I did this: static int wasalloc; static char *string; if ( wasalloc=0 ) { string=(char*)malloc(128); wasalloc=1; } return string; Ok, so I made sure I only allocated once. But, I never freed the memory. I'm concerned that I have little strips of memory floating around cutting my memory blocks into chunks. And the little gremlins eventually causing GPFs. ... If you think you're confused now, just wait until I explain it. --- Blue Wave/DOS v2.20 [NR] * Origin: The Witch City BBS *Salem,MA [978]745-1689 *Hayes 28.8 (1:101/301) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: F2200022 Date: 01/31/98 From: PETER HAYWOOD Time: 01:42am \/To: JIM BAXTER (Read 1 times) Subj: Re: pointers Groovy hepcat Jim Baxter jived with All on 11 Jan 98 12:14:33! pointers's a cool scene. Dig it! JB> okay, i've been working with C for a few years now, and have JB> recently gotten back into it.. pointers still confuse the living JB> daylights out of me though, so could someone please explain to me how JB> they work, what symbols i need use, and what they do, etc.. I think you've bought into the misconception that pointers are dificult to grasp, and have been scared off by them instead of embracing them for the powerful things they are. :) Basically, pointers point to something. It's as simple as that. They reside at one location in the computer's memory, and point to another location. There's nothing hard about that concept, is there? What, exactly, don't you understand about pointers; pointer arithmetic, void pointers, casting pointers to diferent types, something else? Perhaps I can help if I know what the problem is. Wolvaen ... Tell me, which one of these is the oven? - Peg Bundy --- Blue Wave/RA v2.20 * Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)