home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / C1.ZIP / C.A09
Text File  |  1989-01-09  |  187KB  |  5,364 lines

  1. =
  2.  
  3.  
  4.  
  5. From:    Randall Smith 
  6. To:      Paul Emmons                              Msg #2, 03-Jan-89 06:57pm
  7. Subject: Memory Models in .ASM
  8.  
  9. Paul;  I suffered a severe attack of "dumb thumbs" and accidently erased your
  10. original msg and my reply.  I once had to link in a third party (large model)
  11. OBJ file to a small model C program.  You can use the same approach to solve
  12. your problem. First compile your ASM routines with all far references. Then
  13. create a header (.H) file to force call & references to far. ie.
  14.  
  15. int far function_name(int far parm1; char * far parm2);
  16.  
  17. I am not sure the syntax above is correct, I didn't test it.  The concept is
  18. sound however. Make sure you #include the header file.  This works under
  19. Messy-DOS using TC. Hopes this helps...  Later....        Randy.
  20.  
  21. --- Msg V3.2
  22.  * Origin: Point #10 ===> The Mdtn_BBS Point #10  (1:150/511.10)
  23.  
  24.  
  25. From:    Randall Smith 
  26. To:      Dan Norstedt                             Msg #3, 03-Jan-89 07:09pm
  27. Subject: Re: Debugger.
  28.  
  29.  > Most bug hunting aids change the problem from one of
  30.  > finding the cause of a bug to making sure the debugger doesn't add (or
  31.  > hide) any symtoms (sp?) while the search progresses. Further, most bugs
  32.  > can be traced back to their cause without a debugger.
  33.  DN>
  34.  DN> I would state that their is NO professional programming project today
  35. that
  36.  DN> doesn't use a debugger, if one is available. Period.
  37.  
  38.  
  39. How about Lotus 123 Version 3.0?  <BIG grin> Later...    Randy.    Lotus 123
  40. Version 3.0  >>someday..
  41.  
  42. --- Msg V3.2
  43.  * Origin: Point #10 ===> The Mdtn_BBS Point #10  (1:150/511.10)
  44.  
  45. *** There is a reply. See #155.
  46.  
  47.  
  48. From:    Randall Smith 
  49. To:      Bob Stout                                Msg #4, 03-Jan-89 07:25pm
  50. Subject: Common questions--Answered
  51.  
  52. CD> It seems this question comes up about every 3-4 weeks on the C echo CD>
  53. along with the usual:
  54.  
  55. CD>     4) (DREADED) Which C compiler is the best?
  56.  
  57. Bob;  4) "The C compiler you are most familiar with that will get the job you
  58. have to do done"!  And Thats the name of that tune!  Later....           
  59. Randy.
  60.  
  61. --- Msg V3.2
  62.  * Origin: Point #10 ===> The Mdtn_BBS Point #10  (1:150/511.10)
  63.  
  64.  
  65. From:    Bob Stout 
  66. To:      Martin Maney                             Msg #5, 03-Jan-89 04:05am
  67. Subject: HELLO.
  68.  
  69.  > (excerpts from a semilegible photocopy of a list that appears to have 
  70.  > originated at the University of Waterloo)
  71.  
  72. Martin...
  73.  
  74.   I'd love to see the rest of the list, legibility notwithstanding!
  75.  
  76.   ______________________
  77.  /__ __ __     __
  78.  __/ / /_/ /_/ /
  79. /_____________________________________
  80.  
  81.  
  82. --- msged 1.94S ZTC
  83.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  84.  
  85. *** There is a reply. See #27.
  86.  
  87.  
  88. From:    Roland Brown 
  89. To:      Paul Schlyter                            Msg #6, 03-Jan-89 02:11pm
  90. Subject: Re: Ctl-C/Break
  91.  
  92.  > In Turbo C 1.0 and 1.5, the signal function is not implemented.
  93.  >  signal
  94.  > was added in Turbo C 2.0, though.
  95.  >
  96.  
  97. No big deal Paul, but I think signal was implemented in 1.5 (agree it was not
  98. in 1.0).  Borland changed signal in 2.0 and it works differently, but it was
  99. there in 1.5.  Pretty sure but I no longer have the 1.5 manuals - there
  100. somewhere just can't find them in this mess!!
  101.  
  102. roland 
  103.  
  104. ---
  105.  * Origin: Sky Pilot Point Mail Box Off 261/1004 (Opus 1:26102/4)
  106.  
  107. *** There is a reply. See #42.
  108.  
  109.  
  110. From:    Roland Brown 
  111. To:      Rod Whitworth                            Msg #7, 03-Jan-89 02:18pm
  112. Subject: Re: Code Generators
  113.  
  114.  >  >
  115.  >  $459 at Programmers Connection or $635 with the workbench
  116.  > source. I have a
  117.  > demo which seems to be ok but I don't know how portable
  118.  > the generated code is to move to other than messydo. It
  119.  > interfaces to Ctree or Cisam or Btrieve or roll your own
  120.  > (difficult).
  121.  >
  122.  
  123. A little too rich for my pockets when I can't really see what kind of code it
  124. generates and just how "easy to use it is".
  125.  
  126. Thanks for the reply anyway.
  127.  
  128. roland 
  129.  
  130. ---
  131.  * Origin: Sky Pilot Point Mail Box Off 261/1004 (Opus 1:26102/4)
  132.  
  133. *** There is a reply. See #8.
  134.  
  135.  
  136. From:    Roland Brown 
  137. To:      Daniel Lyke                              Msg #8, 03-Jan-89 02:20pm
  138. Subject: Re: Code Generators
  139.  
  140.  > a routine to load those screens (either from memory or disk),
  141.  > and put in your own data entry routines. It wouldn't be
  142.  > as easy as Pro C, nor as complete (Pro C does the database
  143.  > call up code and other stuff, I've got the demo disk around
  144.  
  145. Thanks for the reply.
  146.  
  147. roland 
  148.  
  149. ---
  150.  * Origin: Sky Pilot Point Mail Box Off 261/1004 (Opus 1:26102/4)
  151.  
  152. *** Part of a conversation.
  153.  
  154.  
  155. From:    Bill Dufault 
  156. To:      All                                      Msg #9, 02-Jan-89 06:41pm
  157. Subject: Thanks (pointer Problem)
  158.  
  159.    I would just like to thank all of the people who were nice enough to 
  160. help me with that pointer problem I was having.  Passing the pointers to 
  161. POINTERS to pointers worked fine.  Thanks again.
  162.                                                 Bill
  163.  
  164. --- RBBSMAIL 17.1C
  165.  * Origin: HIPPOCAMPUS - Branford CT (203)481-7475 (RBBSNet 905/4) (RBBS-PC
  166. 1:141/205)
  167.  
  168.  
  169. From:    Malcolm Petcher 
  170. To:      Betsy Schwartz                           Msg #10, 02-Jan-89 02:49pm
  171. Subject: VAX C help
  172.  
  173. Regretably, string descriptors as used in VAX system calls are quite clumsy to
  174. manipulate in C.  The descriptor itself is, I believe, a two longword
  175. quantity, with one longword being a pointer to the string, half of the other
  176. longword is the string length, and two more bytes of unknown function.  I
  177. don't have my notes on it with me, so can't say exactly what order these are
  178. in.  VAX FORTRAN uses exactly this structure for its string descriptors, so if
  179. your installation has the latter language, the easiest thing to do is write
  180. some trivial FORTRAN program that declares a character*n variable, and compile
  181. it with the /list/machine_code options, look at what structure it makes, then
  182. synthesize if in C.  Also, don't forget, when passing this in C, use the
  183. ampersand operator, because VAX system services usually expect the address of
  184. the descriptor, not the descriptor itself.
  185.  
  186. --- ConfMail V4.00
  187.  * Origin: Night City (1:124/4102)
  188.  
  189.  
  190. From:    Malcolm Petcher 
  191. To:      Mike Housky                              Msg #11, 02-Jan-89 02:59pm
  192. Subject: Re: Buffer conversion
  193.  
  194. You can also lock a structure into a predictable memory space by declaring a
  195. union between it and a char array.  That forces it to be contiguous, with no
  196. fill characters.
  197.  
  198. --- ConfMail V4.00
  199.  * Origin: Night City (1:124/4102)
  200.  
  201. *** There is a reply. See #22.
  202.  
  203.  
  204. From:    Malcolm Petcher 
  205. To:      Mike Housky                              Msg #12, 02-Jan-89 03:03pm
  206. Subject: Re: Learning C
  207.  
  208. Actually, some of the source level debuggers out there today are well worth
  209. using.  The VAX debugger is outstanding, though it takes a little preparation
  210. to use effectively.  CodeView is likewise powerful, but complicated.  One of
  211. the nicest debuggers is the one that comes with MicroSoft Quick C - limited,
  212. but simple.  Usually, my first approach, like probably everybodies, is to
  213. stick a few printf's in strategic locations.  If that doesn't solve the
  214. problem, and it's time to get out the big guns, you can't beat a source level
  215. debugger.
  216.  
  217. --- ConfMail V4.00
  218.  * Origin: Night City (1:124/4102)
  219.  
  220. *** There is a reply. See #31.
  221.  
  222.  
  223. From:    Malcolm Petcher 
  224. To:      Tom Mcgivern                             Msg #13, 02-Jan-89 03:12pm
  225. Subject: Re: SUBST, ads
  226.  
  227. Well, just one more message in the thread.  I bought Microsoft FORTRAN 3.3 for
  228. $50, just after 4.0 had come out.  Hell of a deal, if you ask me. It's a darn
  229. good version of FORTRAN, even has substrings and most of the optimizations in
  230. 4.0.  Nothing wrong with offering or buying an old compiler if the price is
  231. right.
  232.  
  233. --- ConfMail V4.00
  234.  * Origin: Night City (1:124/4102)
  235.  
  236. *** There is a reply. See #122.
  237.  
  238.  
  239. From:    Chris Cason 
  240. To:      Chris Day                                Msg #14, 03-Jan-89 08:16am
  241. Subject: Formatting Output
  242.  
  243. Yes, there is an easier way.
  244. By this stage, you have probably been told this ten or more times, but I have
  245. not seen any replies that use the '*' format.
  246. printf ("%10.*f", decimals, real_number) ;
  247. or
  248. sprintf ("%10.*f", decimals, real_number) ;
  249. after all, that's what the '*' format is for.
  250.  
  251. --- ConfMail V4.00
  252.  * Origin: Software Tools - The Crocodile WOC - Sydney, OZ (3:711/403)
  253.  
  254. *** There is a reply. See #84.
  255.  
  256.  
  257. From:    Jeff Bauer 
  258. To:      Ron Warris                               Msg #15, 03-Jan-89 12:25pm
  259. Subject: Re: gettext()
  260.  
  261. >I am writing help screen routines that requires the storage of
  262. >only the screen text where the help window is displayed.  To do
  263. >this I am using the gettext function and storing the screen text
  264. >in an array.
  265.  
  266. >To overcome this I am simply declaring an array size
  267. >large enough to accommodate the largest help window.
  268. >Now it seems to me that this is a rather wasteful
  269.  
  270. You probably want to use the malloc(), calloc() and free()
  271. functions.  The nice thing about this approach is not only are
  272. you allocating just the memory you require for each help screen,
  273. but you are then releasing (hopefully <grin>) the memory back to
  274. your program when you've finished displaying the help screen.
  275.  
  276. #include <stdlib.h>  /* ANSI standard header file */
  277. char *helptext;      /* actual help text to be displayed */
  278. int help_ctr;   /* no. of characters (array size) of helptext */
  279.  
  280. /* First calculate help_ctr.  You can compute it at runtime   */
  281. /* (preferred) or embed it in your helptext data file.        */
  282. /* Presumably you already have a way to calculate this value. */
  283.  
  284. help_ctr = ...;
  285.  
  286. /* calloc() is basically the same as malloc(), except that it */
  287. /* initializes the reserved memory to '\0'.                   */
  288.  
  289. helptext = (char *) calloc(help_ctr + 1, sizeof(char));
  290. if (helptext == NULL) {
  291.     printf("Not enough memory for calloc()\n");
  292.     exit(-1);
  293.     }
  294.  
  295. /* You may now use helptext[] as if it were an array of size    */
  296. /* help_ctr+1.  Remember to append the trailing '\0' when you   */
  297. /* read in its value(s).  Even though calloc() initialized this */
  298. /* for you, it is bad practice not to do it explicitly.         */
  299.  
  300. for (i = 0; i < help_ctr; i++)
  301.     helptext[i] = ...;   /* or somesuch */
  302.  
  303. /* Display the helptext array.  Be sure to release the allocated */
  304. /* memory when you are finished.                                 */
  305.  
  306. display_help(helptext);
  307. free(helptext);
  308.  
  309. This is the general approach to use.  Caveats:  Be sure to check
  310. for any typos and syntax errors in the above.  Hope this helps.
  311.  
  312. --- Via OpXpress V1.03ß
  313.  * Origin: Southern Crossroads PEP and HST (1:124/4115.0)
  314.  
  315. *** There is a reply. See #132.
  316.  
  317.  
  318. From:    Tim Tapio 
  319. To:      Barry Lynch                              Msg #16, 26-Dec-88 08:26am
  320. Subject: CNews
  321.  
  322.  
  323. --- QuickBBS v2.03
  324.  * Origin: Crystal Cavern Lacey, WA  206-459-7277 QuickBBS! (1:138/105)
  325.  
  326.  
  327. From:    Gar Nelson 
  328. To:      Randall Smith                            Msg #17, 31-Dec-88 09:09am
  329. Subject: Re: Windchill
  330.  
  331. RE: Wind Chill
  332.     I have a formula available at work for wind chill, and for wet/dry bulb
  333. conversion to dew point.  Unfortunatly(?) I'm at home and don't have them with
  334. me right now.  If you really want them and can't find them, drop me a line at:
  335.       Nat'l Weather Service Office Olympia
  336.       7645 Old 99 Highway SE
  337.       Olympia, Wa. 98501-5728
  338.       Attn: Gar Nelson
  339. The programs are in TP, I've been meaning to convert them to 'C' RSN, but the
  340. Xmas holiday got in the way...  
  341. (If I rely on remembering to post the formula when I go back to work, there is
  342. a 99 44/100% chance I'll forget.)
  343. --- QuickBBS v2.03
  344.  * Origin: Crystal Cavern Lacey, WA  206-459-7277 QuickBBS! (1:138/105)
  345.  
  346. *** There is a reply. See #152.
  347.  
  348.  
  349. From:    Eddie Rock 
  350. To:      Mike Housky                              Msg #18, 31-Dec-88 12:50pm
  351. Subject: Re: tokenization again
  352.  
  353. A rather thorough reader, there!  Thanks for the reference to K&R, it helps to
  354. clarify things a bit.  The x -= 5 variety is much clearer, so I'm glad it is
  355. preferred over x =- 5.  Besides, for one (like me) with a tendency to
  356. transpose characters while typing, it's quite easy to get x = -5 (and the
  357. wrong result!).
  358. --- QuickBBS v2.03
  359.  * Origin: Crystal Cavern Lacey, WA  206-459-7277 QuickBBS! (1:138/105)
  360.  
  361.  
  362. From:    Eddie Rock 
  363. To:      Ejvind Frantzen                          Msg #19, 31-Dec-88 01:03pm
  364. Subject: Re: boeger om c
  365.  
  366. Gee! looks like I'll have to dig up my old "Einen Ausflug auf den Deutsch
  367. Sprache".  Thought I remebered enough German to be able to read the language,
  368. even if I can't speak it, but your message might as well have been Danish as
  369. far as my comprehension went.  Any chance of setting up a "pen pal"
  370. relationship, so I can become conversant?
  371. --- QuickBBS v2.03
  372.  * Origin: Crystal Cavern Lacey, WA  206-459-7277 QuickBBS! (1:138/105)
  373.  
  374.  
  375. From:    Eddie Rock 
  376. To:      Derron Simon                             Msg #20, 31-Dec-88 01:11pm
  377. Subject: Re: ZOO listing
  378.  
  379. Does your source have configuration for Amiga?  If so, I would like to be able
  380. t freq it!
  381. --- QuickBBS v2.03
  382.  * Origin: Crystal Cavern Lacey, WA  206-459-7277 QuickBBS! (1:138/105)
  383.  
  384. *** There is a reply. See #47.
  385.  
  386.  
  387. From:    John Kruper 
  388. To:      Bill Leary                               Msg #21, 01-Jan-89 05:52pm
  389. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  390.  
  391. RG = Randall Greylock
  392. RG>> typedef struct {
  393. RG>>   int A;
  394. RG>>   int B;
  395. RG>>   int C;
  396. RG>>   } _MyStruct;
  397.  
  398. >     int C_offset;
  399. >     _MyStruct *tMS = (_MyStruct *)0;
  400. >     C_offset = (int)( (long)( &tMS->C ) - (long)( tMS ) );
  401.  
  402. You don't need the tMS variable, since you can just do:
  403.  
  404.        C_offset = (size_t) &(((_MyStruct *)0)->C)
  405.  
  406. size_t is typedef'd in <stddef.h>, and will be an unsigned int of the size
  407. needed to hold the result. In this case, since we know the answer will be
  408. small, a cast to an (int) would be fine, too. Though the expression looks
  409. complex, the compiler should be able to compute it at compile time and insert
  410. the results in the code as a constant (which is not true of the tMS approach
  411. unless the compiler is really clever).
  412.  
  413. > I'm using the pesimistic assumption that a pointer should be converted to 
  414. > a long before being used. In fact, I just re-ran this on the above 
  415. > machine without the (long)'s and it worked fine.
  416.  
  417. Since you are subtracting two pointers to different types (a pointer to an int
  418. minus a pointer to a structure) you need to do some sort of cast on one or
  419. both of them before the subtraction is legal. In practice, a cast to (char *)
  420. might have a better shot at working on bizarre architectures than the cast to
  421. (long), but (long) is a reasonable thing to do. (Though using (size_t) would
  422. be a more portable approach.)
  423.  
  424. --- msged 1.87S ZTC
  425.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  426.  
  427. *** There is a reply. See #36.
  428.  
  429.  
  430. From:    John Kruper 
  431. To:      Felix Castillo                           Msg #22, 01-Jan-89 01:28pm
  432. Subject: Re: Buffer conversion
  433.  
  434. > /* convert from buffer to integer */
  435. > int btoi(char *buff)
  436. > {
  437. >   int i=0,v1,v2=0;
  438. >   while(*buff && i<2)  {        /* allow max of two bytes */
  439. >     if((v1=*buff++)<0)  v1+=256;
  440. >     v2=v2+(v1<<(8*i++));
  441. >   }
  442. >   return(v2);
  443. > }
  444.  
  445. You've got a bug in this fragment. What happens if *buff is zero, but
  446. *(buff+1) isn't? The loop will break on the first *buff (since it is zero),
  447. and btoi() will return zero when it should have returned *(buff+1)<<8.
  448. Modifying your approach to remove the bug:
  449.  
  450.        for (i=0, v2=0; i<2; i++, buff++) {
  451.                if (*buff) {
  452.                   .... [same as before, but w/o the ++ on i and buff]
  453.                }
  454.        }
  455.  
  456. Some hints for greater speed and smaller code size (which admittedly may not
  457. be important to you). You might want to go with:
  458.  
  459. int btoi2(unsigned char *buff)
  460. {
  461.        return *buff + *buf<<8; /* assumes little endian */
  462. }
  463.  
  464. The test for the byte being less than zero can be avoided by telling the
  465. compiler that the char *buff is unsigned (or by leaving the char *buff signed,
  466. but putting a cast to (unsigned char) on each reference to *buff). This saves
  467. on executable code and space, and removes the need for the v1 variable. Also,
  468. the inside of the loop is then much simpler, and it makes sense to "unroll"
  469. the loop (i.e. remove the loop and write out each iteration explicitly as I
  470. did in btoi2() above). Also, notice that the loop approach can't avoid doing a
  471. << on v1 the first time through the loop, even though this won't do anything
  472. useful (since v1 is then zero).
  473.  
  474. > /* convert from buffer to long integer */
  475. > long btol(char *buff)
  476. > {
  477. >   int i=0,v1,v2=0;
  478. >   while(*buff && i<4)  {        /* allow max of four bytes */
  479. >     if((v1=*buff++)<0)  v1+=256;
  480. >     v2=v2+(v1<<(8*i++));
  481. >   }
  482. >   return(v2);
  483. > }
  484.  
  485. Similar comments apply here. Also, you've got another problem since you are
  486. accumulating the sum of a long in an int variable (namely v2). So, a large
  487. long value will "wrap around" in the int v2, and btol() will return the wrong
  488. value. 
  489. Since we have four bytes to process, it makes sense to keep your loop:
  490.  
  491. long btol2(char *buff)
  492. {
  493.        int i;
  494.        long l;
  495.  
  496.        for(i=0, l=0L; i<4; i++, buff++) {
  497.           l = l << 8;
  498.           if (*buff)
  499.                l += (unsigned char) *buff;
  500.        }
  501.        return 0L;
  502. }
  503.  
  504. I left in your optimization of only processing non zero bytes in buff - this
  505. will be a win if zero bytes are expected to be common.
  506.  
  507. But notice that we have several variables doing basically the same thing: i, 
  508. buff, and l are all being incremented once through the loop. So, maybe some of
  509. this activity is redundant? Instead of all of this shifting, look at this
  510. approach:
  511.  
  512. long btol3(char *buff)
  513. {
  514.        long l;
  515.        char *p, *pEnd;
  516.  
  517.        for (p=(char *)&l, pEnd=p+sizeof(long), l=0; p<pEnd; p++, buff++) {
  518.                if (*buff)
  519.                        *p = *buff;
  520.        }
  521.        return l;
  522. }
  523.  
  524. We don't have to worry about signed vs unsigned issues here, since we aren't
  525. doing any arithmetic on *buff, but just copying bits.
  526.  
  527. Now we've reduced things to so that three variables (instead of two) are
  528. active in the loop. However, writing the function this way should make it
  529. clear that we really aren't doing anything to the bytes in buff but copying
  530. them to the bytes in l. Which is why the simplest way to do this is to use a
  531. cast:
  532.  
  533. #define btol4(buff)            (*(long *) buff)
  534. #define btoi3(buff)            (*(int *) buff)
  535.  
  536. The macros are telling the compiler to interpret the address of buff as if a
  537. long were stored there (because in fact, there *is* a long stored there).
  538.  
  539. So, the following would then work:
  540.  
  541.        printf("%ld", btol4(buff));
  542.  
  543. or
  544.        long l;
  545.  
  546.        l = btol4(buff);
  547.  
  548. --- msged 1.87S ZTC
  549.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  550.  
  551. *** Part of a conversation.
  552.  
  553.  
  554. From:    John Kruper 
  555. To:      Mike Housky                              Msg #23, 01-Jan-89 01:31pm
  556. Subject: Re: union and struct
  557.  
  558. >>>   union  {
  559. >>>     struct tag1 {
  560. >>>       char fname[16];        /* 15 chars + '\0' */
  561. >>>       char mi;
  562. >>>       char lname[21];        /* 20 chars + '\0' */
  563. >>>     } name1;                 /* total of 36 chars + 2 '\0' */
  564. >>>     char name2[sizeof(struct tag1)];
  565. >>>   } name;
  566. >>>
  567. >>> Later, you can use sizeof(name.name2) as the constant array size,
  568. >>> when needed. Note that this is only quasi-portable, but will
  569. >>> translate to most machines with byte addressing.
  570.  
  571. >> Why is this only quasi-portable ?
  572.  
  573. > I don't think there is a guarantee that character scalars and/or arrays 
  574. > will not have alignment considerations on all implementations.
  575.  
  576. > However, most real machines will map the name2[] "as expected" over the 
  577. > struct without a problem.
  578.  
  579. I see what you mean. I looked in Harbison and Steele, and in the ANSI draft,
  580. and you are right: there can be padding placed *before* a union member. So,
  581. the address of name.name2 isn't necessarily the same as the address of
  582. name.name1. As a result (as you say) name.name2 isn't guaranteed to overlay
  583. name.name1.
  584.  
  585. I was a little surprised to see that ANSI didn't just require that unions be
  586. aligned to the least common denominator of the union's members. This would
  587. guarantee that all members of a union start at the same address. However, I
  588. guess that unions were never intended to be used to convert from one data type
  589. to another, but simply to allow memory to be "reused" for different purposes.
  590. Also, there may be some architecture in which there is no least common
  591. denominator alignment, or in which such an alignment would be very
  592. inefficient.
  593.  
  594. --- msged 1.87S ZTC
  595.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  596.  
  597. *** There is a reply. See #127.
  598.  
  599.  
  600. From:    Ron Dexter 
  601. To:      Henry Piper                              Msg #24, 02-Jan-89 08:24pm
  602. Subject: Re: Pascal to C
  603.  
  604.  > Starting with Turbo Pascal 4.0 Borland started using .EXE
  605.  > programs as the ouput of their compilers. So, if you switch
  606.  > to version 5.0 of TurboP you will go back to small .EXE
  607.  > files, even smaller, in a lot of cases than the files Turbo C produces.
  608.  
  609. Why??
  610. Why did Borland go to EXE files, are they really any better?
  611. Tell me if I'm right;  EXE files are prefered because you can
  612. continue to add or link to them???; and COM files are good because
  613. they "can be" small and faster???
  614.  
  615. (    ^^-- Never have gotten this straight!)
  616.  
  617.  
  618. Ron
  619.  
  620.  
  621. ---
  622.  * Origin: Burrell's Ballpark (Opus 1:138/52)
  623.  
  624. *** There is a reply. See #64.
  625.  
  626.  
  627. From:    Ron Dex2.115) - Home for wayward Thalidomide Frogs
  628.  
  629. owe                              Msg #25, 02-Jan-89 08:29pm
  630. Subject: Re: Price of Turbo C V2.0 in the USA
  631.  
  632. Turbo C v.2.00 usually runs between U.S. $99 and $120.
  633. If you're lucky you may find a BIG discounter for even cheaper.
  634.  
  635. Ron
  636.  
  637.  
  638. ---
  639.  * Origin: Burrell's Ballpark (Opus 1:138/52)
  640.  
  641.  
  642. From:    Ron Dexter 
  643. To:      Paul Schlyter                            Msg #26, 02-Jan-89 08:31pm
  644. Subject: Re: Turbo Pascal 5.0
  645.  
  646.  > functions (including GotoXY) in the Crt unit available
  647.  > to the program.
  648.  >
  649.  > This is clearly described in the Turbo Pascal ver 4 & 5
  650.  > manuals.
  651.  > Don't you read the manuals????
  652.  
  653.         ^
  654.         What are you talking about, you should
  655.         know never to read manuals and instruction
  656.         books until everything else fails! <GRIN>
  657.  
  658.  
  659.  
  660. ---
  661.  * Origin: Burrell's Ballpark (Opus 1:138/52)
  662.  
  663. *** There is a reply. See #39.
  664.  
  665.  
  666. From:    Doug Boone 
  667. To:      Jon Guthrie                              Msg #27, 02-Jan-89 02:04am
  668. Subject: Re: HELLO.
  669.  
  670. Jon Guthrie of 1:14/627 writes:
  671.  
  672. >1) C uses '{' and '}' instead of 'BEGIN' and 'END'
  673. >
  674. >
  675.   
  676. Huh. You haven't seen anything by Wynn Wagner III. First thing is:
  677.   
  678. #define        BEGIN   {
  679. #define        END     }
  680.   
  681. Poof, C code that looks like Pascal.
  682.  
  683.  
  684.  
  685.  
  686. --- msged 1.95S ZTC
  687.  * Origin: LAZARUS: ChicoNet WOC Host (916) 893-9019  (1:1/113)
  688.  
  689. *** Part of a conversation.
  690.  
  691.  
  692. From:    jim nutt 
  693. To:      Wayne Hamilton                           Msg #28, 02-Jan-89 11:00am
  694. Subject: The Rules as I see them
  695.  
  696. In a message of <01 Jan 89 00:35:07>, Wayne Hamilton (1:232/400) writes:
  697. >jim, could you add a revision datestamp to the rules you post?  i use a 
  698. >scheme to keep such rules resident, and if they are reposted without 
  699. >change, i could save some manual maintenance effort...
  700.  
  701. well.. i suppose.  for the most part, they aren't going to change unless
  702. something radical happens....
  703.  
  704. jim nutt
  705. 'the computer handyman'
  706.  
  707. --- msged 1.96S ZTC
  708.  * Origin: numerology:  recreational computer science (1:114/15.11)
  709.  
  710.  
  711. From:    Dana P'simer 
  712. To:      Charlie Frnka                            Msg #29, 01-Jan-88 10:22am
  713. Subject: Re: Turbo C 2.0 Library
  714.  
  715.  
  716.  >  >      No, TurboC is not appending anything, it's just not
  717.  >  > striping the '\n's .
  718.  > Actually, (since we're splitting hairs here :-) fgets()
  719.  > appends a '\0' to the string.
  720.  
  721.      Go Ahead!  Get picky why don't you! <GRIN>  Actually you are right, that
  722. is why you must supply a bufferr one larger than the number of characters you
  723. actually want as a maximum.
  724.  
  725.      Dana P'Simer
  726.  
  727. --- QuickBBS v2.03
  728.  * Origin: C'ing Clearly Into the Wind (303)939-9272 * FidoNet (1:104/63)
  729.  
  730.  
  731. From:    Bruce M. Miller 
  732. To:      Rubens Abboud Of 167/146                 Msg #30, 01-Jan-89 02:08pm
  733. Subject: Re: TC2.0 - FEOF() BU
  734.  
  735. ***** Quoting message from Rubens Abboud Of 167/146 to Larry Marshall *****
  736.  
  737. .... I guess this is the classic "accuse now, dealwith it later" attitude that
  738. clearly explains why Fidonet was the first to coin the term "flaming". 
  739. ***** End Quote *****
  740.  
  741. The term "flaming" predates Fidonet by MANY years.
  742.  
  743. --- Gnome v1.30
  744.  * Origin: Froghold -- (1:104/62.115) - Home for wayward Thalidomide Frogs
  745.  
  746.  
  747.  
  748. From:    Bruce M. Miller 
  749. To:      George Kamenz                            Msg #31, 01-Jan-89 12:22pm
  750. Subject: Re: Learning C
  751.  
  752. GK> It would be completely inappropriate for someone learning a language
  753. GK> (evenworse if it is his/her first language) on his/her own to begin
  754. GK> by relying ona debugger. My mind, and yours, are much more versatile
  755. GK> tools than any of thesoftware only debuggers I've seen.
  756.    But a debugger is EXTREMELY useful when learning a language.  It allows you
  757. to find out what the code is doing (as opposed to what you thought it meant). 
  758. If your code is doing something unintended due to your misunderstanding of
  759. syntax, a debugger will often immediately point this out.
  760.  
  761. GK> Most bugs can be traced back to their cause without a debugger.
  762. GK> That is especiallytrue for those persons who think about the bugs
  763. GK> and possible causes beforerunning the code while sitting in front 
  764. GK> of a debugger.
  765.    The question (to me) is not whether doing it yourself results in superior
  766. mental discipline (it may) - it's whether you get the problem solved more
  767. rapidly with or without a debugger.  I find the majority (or at least
  768. plurality) of my bugs are due to the source code not saying what I intended. 
  769. Not so much typos as, e.g., when I copied this from that section, I only
  770. changed the variable name in 4 of 5 places, and now it1.31
  771.  * Origin: Duck Point -- Where Cing is o be portable, buty find this by scouring the listing °?
  772.  
  773.  
  774. --- Gnome v1.30
  775.  * Origin: Froghold -- (1:104/62.115) - Home for wayward Thalidomide Frogs
  776.  
  777. *** Part of a conversation.
  778.  
  779.  
  780. From:    Bruce M. Miller 
  781. To:      George Kamenz                            Msg #32, 01-Jan-89 12:49pm
  782. Subject: Re: Learning C
  783.  
  784. GK> It would be completely inappropriate for someone learning a language
  785. GK> (evenworse if it is his/her first language) on his/her own to begin
  786. GK> by relying ona debugger. My mind, and yours, are much more versatile
  787. GK> tools than any of thesoftware only debuggers I've seen.
  788.    But a debugger is EXTREMELY useful when learning a language.  It allows you
  789. to find out what the code is doing (as opposed to what you thought it meant). 
  790. If your code is doing something unintended due to your misunderstanding of
  791. syntax, a debugger will often immediately point this out. A debugger is a
  792. useful way of finding out how an unfamiliar language treats an obscure piece
  793. of code.
  794.  
  795. GK> Most bugs can be traced back to their cause without a debugger.
  796. GK> That is especiallytrue for those persons who think about the bugs
  797. GK> and possible causes beforerunning the code while sitting in front 
  798. GK> of a debugger.
  799.    The question (to me) is not whether doing it yourself results in superior
  800. mental discipline (it may) - it's whether you get the problem solved more
  801. rapidly with or without a debugger.  I find the majority (or at least
  802. plurality) of my bugs are due to the source code not saying what I intended. 
  803. Not so much typos as, e.g., when I copied this from that section, I only
  804. changed the variable name in 4 of 5 places, and now it does strange things.
  805. Granted, it would be possible to eventually find this by scouring the listing
  806. until I noticed the error - but you tend to see what you expect to see, and it
  807. might take me 3 or 4 passes through the code before I noticed it.  A debugger
  808. is a lot faster.
  809.    I'll also grant that there are a lot of things for which debuggers are NOT
  810. suitable.  But I've found that I use them more for FINDING problems, rather
  811. than analyzing code.  The problem is usually trivial once located.  
  812. I remember once spending 4 hours (with no debugger handy) before finding that
  813. I had typed a "j" for an index in a loop whose index variable was "i" - the
  814. previous loop had used both i & j, and so j was legal and had a value.  I knew
  815. where the problem had to be - but I just kept reading what was supposed to be
  816. there instead of what was.  Debuggers don't do that, which is why I like them.
  817.  
  818. --- Gnome v1.30
  819.  * Origin: Froghold -- (1:104/62.115) - Home for wayward Thalidomide Frogs
  820.  
  821. *** Part of a conversation.
  822.  
  823.  
  824. From:    Scott Ladd 
  825. To:      Grant Wagner                             Msg #33, 01-Jan-89 09:19pm
  826. Subject: Re: QuickC 2.00
  827.  
  828. Yes, your 1.0x Code will work with 2.00 without problem.
  829.  
  830. Microsoft made a number of bug-fixes between 1.00 and 1.01; the biggest of
  831. these was providing a work around for a conflist with a buggy Western Digital
  832. HD controller.
  833.  
  834. I have talked with Greg Lobdell, the person who oversees all of the 'Quick'
  835. languages at Microsoft. He confirms my interpretation: you own your source and
  836. the resulting .EXE file. All Microsoft owns is the copyright to the library
  837. routines, for which it charges nothing. Microsoft's license is worded such
  838. that people become confused by it; the only time you have to give Microsoft
  839. any direct credit is when your use one of their run-time .EXEs, such as
  840. BRUN45.EXE for QuickBASIC, or MSHERC.COM for Hercules compatibility.
  841.  
  842. --- Gnome v1.31
  843.  * Origin: Duck Point -- Where Cing is o be portable, but it (or some variation 
  844.  JK> thereof) "usually" works.
  845.  JK> 
  846.  JK> ANSI C includes a function/macro called offsetof() in stddef.h for just 
  847.  JK> this purpose. My OffsetOf() macro above is one of the implementations 
  848.  JK> that the Rationale suggests as possible for the ANSI offsetof().
  849.  
  850. Yes, but can these be used while statically initing ANOTHER structure?  I.E.,
  851. no ='s?
  852.  
  853. --- ConfMail V4.00
  854.  * Origin: Greylock (1:321/202.4)
  855.  
  856. *** There is a reply. See #240.
  857.  
  858.  
  859. From:    Randall Greylock 
  860. To:      Paul Schlyter                            Msg #39, 03-Jan-89 11:10am
  861. Subject: Re: Turbo Pascal 5.0
  862.  
  863.  PS> This is clearly described in the Turbo Pascal ver 4 & 5 manuals.
  864.  PS> Don't you read the manuals????
  865.  
  866. More importantly, what is this doing in the C-Echo?
  867.  
  868. --- ConfMail V4.00
  869.  * Origin: Greylock (1:321/202.4)
  870.  
  871. *** This is a reply to #26.
  872.  
  873.  
  874. From:    Bill Leary 
  875. To:      Paul Schlyter                            Msg #40, 04-Jan-89 08:42am
  876. Subject: Re: C AND UNIX
  877.  
  878. re: kermit & 8th bit quoting.
  879.  
  880. I'll yield to your apparently superior knowledge in this area. I was passing
  881. on an observation from someone at work when we had a similar problem with
  882. Kermit on the VAX dropping the 8th bit. We fixed the problem with an 'stty'
  883. statement before I had to actually test this feature.
  884. --- TBBS v2.1
  885.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  886.  
  887. *** There is a reply. See #102.
  888.  
  889.  
  890. From:    Bill Leary 
  891. To:      George Kamenz                            Msg #41, 04-Jan-89 08:45am
  892. Subject: Re: C PROGRAMS
  893.  
  894.  BL> main(){}
  895.  BL> which works fine on every system I've tried and does exactly what
  896.  BL> you'd expect. Nothing.
  897.  GK> Do you happen to have comparitive timings? :-)
  898.  
  899. Actually, the VAX reports a very VERY low amount of system overhead, and no
  900. user time when I run it. I guess the overhead is from loading and discarding
  901. the program, and probably from the call to '_exit'.
  902. --- TBBS v2.1
  903.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  904.  
  905. *** There is a reply. See #103.
  906.  
  907.  
  908. From:    Bill Leary 
  909. To:      Bob Stout                                Msg #42, 04-Jan-89 10:00am
  910. Subject: Re: CTL-C/BREAK
  911.  
  912. re: system("BREAK OFF");
  913.  
  914. Well, no, this won't stop all control-C/control-BREAK's from halting your
  915. program. It just turns off the check for break that DOS does before and/or
  916. after many non-console related operations. If you do a console operation (like
  917. getchar, or printf) and you haven't done something to keep the console driver
  918. from handling control-C/control-BREAK, it will still stop your program with
  919. the usual abort. The window of oportunity for the ^C/^BREAK taking you down is
  920. much lower, but it's certainly still there.
  921. --- TBBS v2.1
  922.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  923.  
  924. *** Part of a conversation.
  925.  
  926.  
  927. From:    Bill Leary 
  928. To:      Drew Macinnis                            Msg #43, 04-Jan-89 10:06am
  929. Subject: Re: PRODUCTIVITY
  930.  
  931. The .COM file contains no relocation data and is limited to 64K code, data,
  932. and the rest. It *CAN* make calls to DOS to get more memory, but it can
  933. usually only use that for data (unless you've got some way to play games with
  934. overlays in that memory you get from DOS).
  935.  
  936. The .EXE file contains relocation information, and can use a theoretical
  937. unlimited amount of memory for code, data, stack, heap, etc. The .COM file
  938. was, more than anything else, kept for compatibility with CP/M when DOS was
  939. first introduced.
  940.  
  941. Oh, almost forgot, a .COM file loads somewhat faster than a .EXE, though the
  942. difference is often undetectable.
  943. --- TBBS v2.1
  944.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  945.  
  946. *** There is a reply. See #143.
  947.  
  948.  
  949. From:    Bill Leary 
  950. To:      Jeff Bauer                               Msg #44, 04-Jan-89 10:27am
  951. Subject: Re: NON-ANSI C
  952.  
  953.  JB> My approach would be to plce the prototypes in the header files
  954.  JB> and use AWK to move the variables outside the function parenthesis
  955.  JB>
  956.  JB> ie: int doit(int cnt, char *str) {
  957.  JB>         ...
  958.  JB>         }
  959.  JB>
  960.  JB>BECOMES  int doit() {
  961.  JB>             int cnt;
  962.  JB>             char *str;
  963.  JB>             ...
  964.  JB>             }
  965.  
  966.  I don't think that BECOMES will work. At least, my compilers complain that
  967. 'cnt' and 'str' aren't in the argument list. What you want it to become for
  968. K&R compatibility is :
  969.  
  970.       int doit(cnt,str)
  971.       int cnt;
  972.       char *str;
  973.       {
  974.           ....
  975.       }
  976.  
  977.  With, of course, whatever your preferenace might be for indentation.
  978. --- TBBS v2.1
  979.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  980.  
  981. *** There is a reply. See #54.
  982.  
  983.  
  984. From:    Juyt Sternala 
  985. To:      All                                      Msg #45, 02-Jan-89 10:04pm
  986. Subject: LEARNING C
  987.  
  988. To All:
  989.        My name is John Sternala, I am an engineering student, and I
  990.        would like to learn C. I have had a semester of Turbo Pascal
  991.        and would appreciate any info of books and software to help 
  992.        in learning C. Information on writting to the ports would
  993.        also be welcomed.
  994.       
  995.             
  996.                                                  Thank You,
  997.                                                 
  998.                                                  John Sternala
  999.  
  1000. --- TBBS v2.0
  1001.  * Origin:         APOLLO SYSTEMS TBBS - Chicopee, MA (413)594-2524  (321/301)
  1002.  
  1003. *** Part of a conversation.
  1004.  
  1005.  
  1006. From:    Randall Greylock 
  1007. To:      John Kruper                              Msg #46, 04-Jan-89 11:54am
  1008. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  1009.  
  1010.  JK> RG = Randall Greylock
  1011.  JK> RG>> typedef struct {
  1012.  JK> RG>>   int A;
  1013.  JK> RG>>   int B;
  1014.  JK> RG>>   int C;
  1015.  JK> RG>>   } _MyStruct;
  1016.  JK> 
  1017.  JK> >     int C_offset;
  1018.  JK> >     _MyStruct *tMS = (_MyStruct *)0;
  1019.  JK> >     C_offset = (int)( (long)( &tMS->C ) - (long)( tMS ) );
  1020.  JK> 
  1021.  JK> You don't need the tMS variable, since you can just do:
  1022.  JK> 
  1023.  JK>        C_offset = (size_t) &(((_MyStruct *)0)->C)
  1024.  
  1025. Earth to moonbase everyone!  I DON'T WANT TO DO THIS AT RUN TIME!
  1026.  
  1027. Let me restate the problem.
  1028.  
  1029. Assume TWO structures - _MyStruct as defined above, and:
  1030.  
  1031. typedef struct {
  1032.   char FldNm[30];
  1033.   unsigned int Offset;
  1034.   } _MyOffset;
  1035.  
  1036. What I want to do is something like this:
  1037.  
  1038. _MyOffset = {
  1039.   "Variable C",
  1040.   [computed offset to C in _MyStruct goes here]
  1041.   };
  1042.  
  1043. I.E., I want to do it STATICALLY!  At COMPILE TIME.  Not run time.
  1044.  
  1045. --- ConfMail V4.00
  1046.  * Origin: Greylock (1:321/202.4)
  1047.  
  1048. *** Part of a conversation.
  1049.  
  1050.  
  1051. From:    Randall Greylock 
  1052. To:      Eddie Rock                               Msg #47, 04-Jan-89 11:57am
  1053. Subject: Re: ZOO listing
  1054.  
  1055.  ER> Does your source have configuration for Amiga?  If so, I would like to 
  1056.  ER> be able t freq it!
  1057.  
  1058. The sources I have (Z201Src*.Zoo) talks about Amigas.
  1059.  
  1060. --- ConfMail V4.00
  1061.  * Origin: Greylock (1:321/202.4)
  1062.  
  1063. *** Part of a conversation.
  1064.  
  1065.  
  1066. From:    Randall Greylock 
  1067. To:      Bob Stout                                Msg #48, 04-Jan-89 12:00pm
  1068. Subject: Mix Power C
  1069.  
  1070.  BS> inflammatory (potentially leading into the dreaded "compiler wars"), 
  1071.  
  1072. You don't suppose we could get these banned by the geneva convention, do you?
  1073.  
  1074. --- ConfMail V4.00
  1075.  * Origin: Greylock (1:321/202.4)
  1076.  
  1077. *** There is a reply. See #145.
  1078.  
  1079.  
  1080. From:    Randall Greylock 
  1081. To:      Roy Browning                             Msg #49, 04-Jan-89 12:01pm
  1082. Subject: Problem reading message
  1083.  
  1084.  RB> the message exemplifying the problem.  Can someone supply him with some 
  1085.  RB> software that will delete every message emanating from my Board?  For I 
  1086.  
  1087. A bit difficult in echomail.  A utility called KillrDog can easily be used to
  1088. kill all messages from a given person, however.  Available my system as
  1089. KillrDog.Zoo if you want to pick it up and mail it to whoever.
  1090.  
  1091. --- ConfMail V4.00
  1092.  * Origin: Greylock (1:321/202.4)
  1093.  
  1094. *** There is a reply. See #202.
  1095.  
  1096.  
  1097. From:    Roy Tellason 
  1098. To:      Dana & Bruce                             Msg #50, 04-Jan-89 05:39pm
  1099. Subject: getting started in c
  1100.  
  1101.  
  1102.  From Mike Daly: 
  1103.   
  1104.  MD> What files do I need to download from Area 18 in the files 
  1105.  MD> area in order to create, compile, link a program in C?  
  1106.   
  1107.  From Dana P'Simer: 
  1108.   
  1109.  DP> BUT I think I can help you anyway. [stuff deleted] 
  1110.  DP> if you want a real C compiler I suggest you take a look 
  1111.  DP> at Zortech C, or QuickC [more stuff deleted] 
  1112.  DP> for creating the C programs you will need a good text editor, 
  1113.  DP> there are several ShareWare and PD/FreeWare editors out there 
  1114.  DP> such as MicroEmacs, QEDIT, and others. [and so on...] 
  1115.   
  1116.  From Bruce M. Miller 
  1117.   
  1118.  BM> for a good, cheap start you might try buying Power C from 
  1119.  BM> Mix Software. [etc.] 
  1120.   
  1121.  Hey guys,  where did he say he was using ms-dos, eh?   :-) 
  1122.   
  1123.  
  1124. --- Opus-CBCS 1.10.0f
  1125.  * Origin: TThe ANSI compilers can
  1126. handle the old method
  1127. *** P #176.
  1128.  
  1129.  
  1130. From:    Roy Tellason 
  1131. To:      Rod Whitworth                            Msg #51, 04-Jan-89 05:39pm
  1132. Subject: Source to libs
  1133.  
  1134.  
  1135.  > Let's all vote that compiler vendors do what Whitesmiths (used 
  1136.  > to) do,  that is supply the lib source and supply the .obj files 
  1137.  > for all their executables so that they can be ported to any 
  1138.  > environment using the same instruction set.  I don't know if 
  1139.  > it still happens but way back it made it possible to port 
  1140.  > their CP/M 8080 compiler to our z80 unix system. 
  1141.   
  1142.  This is the first that I've heard that Whitesmiths made a cp/m compiler. 
  1143.  While I'd guess that they're not pushing it these days,  I'm going to have 
  1144.  to see if they will still sell it at all.  Also,  you did say "z80 unix 
  1145.  system" back there.  I'd be interested in hearing more about that, too. 
  1146.  Did it perform at all well? 
  1147.   
  1148.  
  1149. --- Opus-CBCS 1.10.0f
  1150.  * Origin: The Other BBS (1:150/501.0)
  1151.  
  1152.  
  1153. From:    Roy Tellason 
  1154. To:      Martin Maney                             Msg #52, 04-Jan-89 05:40pm
  1155. Subject: Re: Buffer conversion
  1156.  
  1157.  
  1158.  > /\/\artin (the data may run, but it cannot hide) 
  1159.   
  1160.  Heh heh.  I just picked up a button the other day that says "If you 
  1161.  torture the data enough, it will confess".  <grin> 
  1162.   
  1163.  I did something like what you're saying with use of an array of char for a 
  1164.  buffer,  etc.,  but I fed the address of the buffer to functions that 
  1165.  thought they were dealing with structs,  so I didn't have to mess around 
  1166.  with all that casting of pointers and such. 
  1167.   
  1168.  
  1169. --- Opus-CBCS 1.10.0f
  1170.  * Origin: The Other BBS (1:150/501.0)
  1171.  
  1172. *** This is a reply to #22.
  1173.  
  1174.  
  1175. From:    Roy Browning 
  1176. To:      Joseph Mann                              Msg #53, 31-Dec-88 09:57am
  1177. Subject: Let's C
  1178.  
  1179.  
  1180. Joseph:
  1181.  
  1182.        I use the Mark Williams Let's C package.  If you have questions you can
  1183. NetMail me directly.  Let's C could best be used by someone working in both
  1184. the Unix and PC environments.  It is a full K&R compiler, not ANSI compatible.
  1185. Personally I have learned how to use it effectively and it is my first choice
  1186. when developing a program.  However for a totally inexperienced user Power C
  1187. might have been a better selection.
  1188.  
  1189.        As to your problems, call Mark Williams at (800)MWC-1700.  For I've
  1190. used it on both an 8088 and 80386 with no problems.  Plus Dave Giunti recently
  1191. ran a program compiled on my machine and he uses a V20 as his processor.
  1192.  
  1193.        Someone getting frustrated with MWC is how Bob Stout obtained his copy
  1194. of Let's C.  And I haven't found any compiler I couldn't blow up in a week of
  1195. concentrated programming!  So if anyone gets disgusted and wants to throw one
  1196. away we'll take `em, by jimminie.
  1197.  
  1198.                         I hope you solve your problems,
  1199.  
  1200.                                   Roy Browning
  1201.  
  1202.  
  1203. --- msged 1.943L MSC
  1204.  * Origin: The Fulcrum's Edge ____WO'C'ing___the___Line____/\__ (713)350-6284 
  1205. Spring, Texas  (1:106/506.1)
  1206.  
  1207. *** There is a reply. See #55.
  1208.  
  1209.  
  1210. From:    Roy Browning 
  1211. To:      Jeff Bauer                               Msg #54, 03-Jan-89 08:10pm
  1212. Subject: Non-ANSI C
  1213.  
  1214. In a message of <02 Jan 89 11:34:53>, Jeff Bauer (1:124/4115) writes:
  1215.  
  1216. >i.e.     int doit(int cnt, char *str) {
  1217. >             ...
  1218. >             }
  1219. >
  1220.  
  1221. Jeff:
  1222.  
  1223.        As a K&R 'C'eer I can tell that that won't fly.  The ANSI compilers can
  1224. handle the old method
  1225. *** Part of a conversation.
  1226.  
  1227.  
  1228. From:    Roy Browning 
  1229. To:      Joseph Mann                              Msg #55, 04-Jan-89 01:50am
  1230. Subject: Let's C
  1231.  
  1232.  
  1233. Joseph:
  1234.  
  1235.        I use the Mark Williams Let's C package.  If you have questions you can
  1236. NetMail me directly.  Let's C could best be used by someone working in both
  1237. the Unix and PC environments.  It is a full K&R compiler, not ANSI compatible.
  1238. Personally I have learned how to use it effectively and it is my first choice
  1239. when developing a program.  However for a totally inexperienced user Power C
  1240. might have been a better selection.
  1241.  
  1242.        As to your problems, call Mark Williams at (800)MWC-1700.  For I've
  1243. used it on both an 8088 and 80386 with no problems.  Plus Dave Giunti recently
  1244. ran a program compiled on my machine and he uses a V20 as his processor.
  1245.  
  1246.        Someone getting frustrated with MWC is how Bob Stout obtained his copy
  1247. of Let's C.  And I haven't found any compiler I couldn't blow up in a week of
  1248. concentrated programming!  So if anyone gets disgusted and wants to throw one
  1249. away we'll take `em, by jimminie.
  1250.  
  1251.                         I hope you solve your problems,
  1252.  
  1253.                                   Roy Browning
  1254.  
  1255.  
  1256. --- msged 1.943L MSC
  1257.  * Origin: The Fulcrum's Edge ____WO'C'ing___the___Line____/\__ (713)350-6284 
  1258. Spring, Texas  (1:106/506.1)
  1259.  
  1260. *** This is a reply to #53.
  1261.  
  1262.  
  1263. From:    Roy Browning 
  1264. To:      Jeff Bauer                               Msg #56, 04-Jan-89 01:49am
  1265. Subject: Non-ANSI C
  1266.  
  1267. In a message of <02 Jan 89 11:34:53>, Jeff Bauer (1:124/4115) writes:
  1268.  
  1269. >i.e.     int doit(int cnt, char *str) {
  1270. >             ...
  1271. >             }
  1272. >
  1273.  
  1274. Jeff:
  1275.  
  1276.        As a K&R 'C'eer I can tell that that won't fly.  The ANSI compilers can
  1277. handle the old method of function declaration but the K&R compilers can't 
  1278. handle the prototypes!!!  Every functions will have to be hand modified or or 
  1279. both versions incorporated with #defines.  Example:
  1280.  
  1281. #ifdef ANSI
  1282. int doit(int cnt, char *str){}
  1283. #else
  1284.  /* K&R */
  1285. int doit(cnt, *str)
  1286. int cnt;
  1287. char *str;
  1288. {}
  1289. #endif
  1290.  
  1291.        Thus far ANSI 'C' has only been a problem to me.  In a large program it
  1292. takes hours just to modify the functions!  If anyone does come up with an AWK 
  1293. script please send me a copy and don't forget about changing the declarations 
  1294. in the header files.
  1295.  
  1296.                             Still no C++ code,
  1297.  
  1298.                                Roy Browning
  1299.  
  1300.  
  1301. --- msged 1.96S ZTC
  1302.  * Origin: The Fulcrum's Edge ____WO'C'ing___the___Line____/\__ (713)350-6284 
  1303. Spring, Texas  (1:106/506.1)
  1304.  
  1305. *** Part of a conversation.
  1306.  
  1307.  
  1308. From:    Lee Fields 
  1309. To:      Ian Yokota                               Msg #57, 03-Jan-89 02:38pm
  1310. Subject: Re: Dr Dobbs, C Lang, And Comm Prog
  1311.  
  1312.  >
  1313.  >
  1314.  >  IY>Is there anyone out there reading Dr. Dobbs Journal
  1315.  > of Software
  1316.  >  IY>Tools
  1317.  >  IY>or interested in C Language or even Communication.
  1318.  >  IY>
  1319.  >  IY>In Dr. Dobbs Journal they started an article where they
  1320.  > are writting
  1321.  >  IY>a
  1322.  >  IY>Communication program in C.  This program spans approx.
  1323.  > 12 months.
  1324.  >  IY>I would like to get a few people together to type up
  1325.  > the program.
  1326.  >  IY>Each person would type up 1 of the issues.
  1327.  
  1328. There is a Dr. Dobb's forum on Compuserve that has the source code for
  1329. articles available for downloading.  Try finding someone with an account to
  1330. get them for you. 
  1331.  
  1332. ---
  1333.  * Origin: PCBBS1 - Ponca City, OK - 24 Hr. Mail, File Req. (Opus 1:19/16)
  1334.  
  1335. *** There is a reply. See #107.
  1336.  
  1337.  
  1338. From:    Bob Stout 
  1339. To:      Jeff Bauer                               Msg #58, 04-Jan-89 07:33am
  1340. Subject: Re: Walter and Micro C
  1341.  
  1342. Jeff...
  1343.  
  1344.   As I mentioned to Chris Shutters, I think Walter's advice is generally sound
  1345. (even a slow multi-pass compiler is likely to be sped up), but in my 
  1346. experience the payoff is minimal compared to some other optimization 
  1347. enhancement tricks (e.g. less modularity). My current coding style has been 
  1348. significantly influenced by several years of using Walter's optimizing 
  1349. compilers and is a follows:
  1350.  
  1351. 1.  Generally code top down, i.e. main() at the top.
  1352. 2.  Put the tasks with the most subfunctions right below main().
  1353. 3.  If a task has several subfunctions, declare them along with the task in a
  1354.     header block, then place them ahead of the task in which they're called.
  1355. 4.  Unless using the C++ modifier "inline", avoid small (2-4 lines of actual
  1356.     code) functions which are only called once or twice.
  1357.  
  1358.   This is obviously referring to a fairly small program, yet the principles 
  1359. carry over when dealing with multiple modules. I always try to keep my source 
  1360. files large enough to give the optimizer a chance, and each one follows the 
  1361. same "overall top down, detail bottom up" style. Overall this has proven to be
  1362. an effective compromise between the conflicting requirements of 
  1363. maintainability and optimization enhancement. 
  1364.  
  1365. --- msged 1.96S ZTC
  1366.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  1367.  
  1368. *** There is a reply. See #216.
  1369.  
  1370.  
  1371. From:    Bob Stout 
  1372. To:      Jeff Bauer                               Msg #59, 04-Jan-89 07:45am
  1373. Subject: nawk
  1374.  
  1375. In a message of <02 Jan 89 11:55:32>, Jeff Bauer (1:124/4115) writes:
  1376. >An enhanced version of AWK has been released in AT&T's SysV Rel 3.1
  1377. >UNIX.  This program is called nawk...
  1378.  
  1379. Jeff...
  1380.  
  1381.   OK, now the real question is when will Rob Duff come up with a PC NAWK? 
  1382.  
  1383. --- msged 1.96S ZTC
  1384.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  1385.  
  1386.  
  1387. From:    Bob Stout 
  1388. To:      Jeff Bauer                               Msg #60, 04-Jan-89 07:47am
  1389. Subject: Non-ANSI C
  1390.  
  1391. In a message of <02 Jan 89 11:34:53>, Jeff Bauer (1:124/4115) writes:
  1392. >I need to maintain compatible source between some ANSI and non-ANSI
  1393. >C environments...
  1394. >
  1395. >My approach would be to place the prototypes in the header files
  1396. >and use AWK to move the variables outside the function parentheses
  1397. >
  1398. >Does anyone have a better idea?
  1399.  
  1400. Jeff...
  1401.  
  1402.   No, but once you have the AWK script written, I know Roy Browning and lots 
  1403. of other MWC users would be eternally grateful if you were to post it! :-) 
  1404.  
  1405. --- msged 1.96S ZTC
  1406.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  1407.  
  1408. *** Part of a conversation.
  1409.  
  1410.  
  1411. From:    Bob Stout 
  1412. To:      George Kamenz                            Msg #61, 04-Jan-89 07:50am
  1413. Subject: Re: char far *
  1414.  
  1415. In a message of <01 Jan 89 15:52:01>, George Kamenz (1:135/1.5) writes:
  1416. >Well... the way I did it was kind of brute force. Just pull the object out 
  1417. >of the library, modify its symbol names, rename the object, and use it. It 
  1418. >is a great deal of work, and now that I have the source to a library I'll 
  1419. >probably do it differently next time.
  1420.  
  1421. George...
  1422.  
  1423.   Yeah, great isn't it? And some people still wonder why bother with library 
  1424. source... :-) 
  1425.  
  1426. --- msged 1.96S ZTC
  1427.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  1428.  
  1429.  
  1430. From:    Kirby Angell 
  1431. To:      Stephen Thompson                         Msg #62, 03-Jan-89 04:57pm
  1432. Subject: Turbo C
  1433.  
  1434. In a message of <29 Dec 88 20:16:34>, Stephen Thompson (3:711/417) writes:
  1435.  
  1436. >Is there anyway that I can make a room needed for Turbo C (IBM) smaller... 
  1437. >I keep running out of memory !!
  1438. >
  1439.  
  1440. Turbo C needs at least 400k and really 500+ to compile much of anything with 
  1441. the integrated environment.  Don't know what the command line version 
  1442. requires but its more than what DoubleDos will give it.
  1443.  
  1444. Kirb
  1445.  
  1446. --- ConfMail V3.31
  1447.  * Origin: Terminus -- The Programmers Interchange (1:147/42)
  1448.  
  1449. *** There is a reply. See #93.
  1450.  
  1451.  
  1452. From:    Kirby Angell 
  1453. To:      Chris Crowe                              Msg #63, 03-Jan-89 05:12pm
  1454. Subject: Re: reading the 'command line'
  1455.  
  1456. In a message of <30 Dec 88 08:01:10>, Chris Crowe (3:770/400) writes:
  1457.  
  1458. >The argc is the count of the arguments the first argument is the command 
  1459. >line you typed in for the name of the program.
  1460.  
  1461. The first argument (in argv[]) is the name of the program only in DOS versions
  1462. 3.3 and above.  In previous versions (depending on the compiler but generally)
  1463. argv[0] == NULL.
  1464.  
  1465. Kirb
  1466.  
  1467.  
  1468. --- ConfMail V3.31
  1469.  * Origin: Terminus -- The Programmers Interchange (1:147/42)
  1470.  
  1471. *** There is a reply. See #111.
  1472.  
  1473.  
  1474. From:    Henry Piper 
  1475. To:      Ron Dexter                               Msg #64, 04-Jan-89 06:33pm
  1476. Subject: Re: Pascal to C
  1477.  
  1478. You do have it right! The advantage of .COM programs are that they are faster
  1479. to load than .EXE, but are limited to 64k.(Supposedly). .EXE programs can be
  1480. much larger, but are somewhat slower to load.
  1481.  
  1482.  
  1483. --- Opus-CBCS 1.10.v
  1484.  * Origin: Crystal Palace  The Ghost in the Machine  (1:382/1.0)
  1485.  
  1486. *** Part of a conversation.
  1487.  
  1488.  
  1489. From:    Henry Piper 
  1490. To:      Scott Ladd                               Msg #65, 04-Jan-88 07:33pm
  1491. Subject: Re: QuickC 2.00
  1492.  
  1493. In you MicroCornucopia artical you said Quick C should be out by the time I
  1494. read that artical. Well... Is this going to be another DBase4.
  1495.  
  1496.  
  1497.  
  1498. ---
  1499.  * Origin: Austin Code Works -- The Source of C (Opus 1:382/12)
  1500.  
  1501. *** Part of a conversation.
  1502.  
  1503.  
  1504. From:    Ronald Perrella 
  1505. To:      Patrick Wu                               Msg #66, 02-Jan-89 12:33pm
  1506. Subject: VAXen
  1507.  
  1508.  Actually, you can stop calling VAXen (the's time for C II - When the Gangs Take Over the From:  Anything more powerful than that COULD be considered to
  1509. be a mainframe...  VAX 8800 is a BIG machine.
  1510.  
  1511.  
  1512. --- OPUS 1.03b ,Binkley and Confmail too!
  1513.  
  1514. --- ConfMail V4.00
  1515.  * Origin: Crystal Vision  813-355-1002 Sarasota Fla Opus xpress all the
  1516. way!!!! (1:137/17)
  1517.  
  1518. ***tch() - For somme funny reason which I don't entgjmp() to r1;40;33m    Walter Purdy 
  1519. To:      Sysop                                    Msg #67, 03-Jan-88 07:48pm
  1520. Subject: FD FILE
  1521.  
  1522. Your welcome to the files. Since I did not read your rules...
  1523. Do you have any rules against xxx files be they games or pic files. If so
  1524. I'll do some screening on my end and try not to up load any files of this
  1525. type.
  1526.  
  1527. P.S. I'll call back later tonight to see if you have ready the nodlist>
  1528.  
  1529.  
  1530.  
  1531. later
  1532. Walter
  1533. --- QuickBBS v2.03
  1534.  * Origin: The Total Concept (817)573-4139 130/18.0 (1:130/18)
  1535.  
  1536.  
  1537. From:    Mark Lipman 
  1538. In The Heart Of The Garden City : (Opus 3:770/40ALL ME DIRECT         Msg #68, 02-Jan-89 10:25am
  1539. Subject: Re: BLINKING CURSOR
  1540.  
  1541. Just set the starting and ending rows to be equal...
  1542. That should do it, irrespective of the screen position
  1543. --- TBBS v2.0
  1544.  * Origin: Paragon Australia - Doorway to the Secret Garden (712/502)
  1545.  
  1546. *** There is a reply. See #92.
  1547.  
  1548.  
  1549. From:    Mark Lipman 
  1550. To:      Steve St.laurent                         Msg #69, 02-Jan-89 10:32am
  1551. 0;36m
  1552.  
  1553. FAG
  1554. FAG
  1555. FAG
  1556. FAG
  1557. FAGU L0>IJK %RFH&T$Y #"QASCWZDE"!           hercules graphics. There should be a text file with new
  1558. features and errata which explains it (its with the full version -- I'm not
  1559. sure if its with quick C). It also needs the .COM file MSHERC.COM. If you
  1560. can't find it, mail me and I'll copy the relevant bits for you...
  1561.  
  1562. --- TBBS v2.0
  1563.  * Origin: Paragon Australia - Doorway to the Secret Garden (712/502)
  1564.  
  1565.  
  1566. From:    Paul Edwards 
  1567. To:      All                                      Msg #70, 02-Jan-88 12:03pm
  1568. Subject: sin() in calculator
  1569.  
  1570. Hello all.  I was wondering if someone could help me with this.  A bloke
  1571. I know has written a calculator in C.  Now he wants to add support for
  1572. sin, cos, tan, log and any other function that anyone might write at a
  1573. later date, such as cfact (for factorials).  Now the functions may take
  1574. any number of parameters, and return int, float, double etc.  When
  1575. someone types in sin(3) it is fairly obvious what they want.  But how do
  1576. you convert this line into a function call to the same name?  At the
  1577. moment, we have support for functions taking 1 or 2 double arguments
  1578. returning double.  We do it a bit like this:
  1579. double (*fun[])() = {sin, cos, tan} ;
  1580. double (*nam[])() = {"sin", "cos", "tan"} ;
  1581. ans = fun[1](a,b) ;  /* where b is uninitialized for cos */
  1582. 1) Is it ok to call a function with 2 parameters, when it only expects
  1583.    to receive 1?
  1584. 2) Is it possible to build a parameter list?
  1585. What I would really like is to maybe have a structure that holds the
  1586. function name and string literal.  I could have a macro that generates
  1587. the word sin (or whatever) and the same word enclosed in quotes.  But
  1588. the main thing is to be able to just declare the function double
  1589. sin(double) ; (Or just #include <math.h>) and then just read in the
  1590. user's input, build the parameter list and get the return value
  1591. according to what the prototype says.  I know I am asking for a lot, but
  1592. I reckon if it's obvious to me, I should be able to explain the
  1593. obviousness to the computer.  If I was using a decent language anyway.
  1594. Maybe it's time for C II - When the Gangs Take Over the From:    Chris Crowe 
  1595. To:      Stig Jacobsen (SysOp)                    Msg #71, 04-Jan-89 08:05am
  1596. Subject: Re: CTL-C/BREAK
  1597.  
  1598.  > Furthermore, if you use Turbo-C, you must write new functions
  1599.  > for kbhit(),
  1600.  > and getch() - For somme funny reason which I don't entgjmp() to return to any point in the program.               
  1601.                                                                    
  1602.  
  1603.     Returns:    ctrlbrk() returns nothing.  0 is returned by the handler 
  1604.                 function to abort the current program.  Any other value 
  1605.                 causes the program to resume execution.            
  1606.  
  1607.                                                                    
  1608. int handler(void)
  1609. {
  1610.   printf("Ctrl-Brk hit, aborting....\n");
  1611.   return(0);
  1612. }
  1613.  
  1614. void main()
  1615. {
  1616.   ctrlbrk(handler);
  1617.  
  1618.   ...  Rest of program ...
  1619.  
  1620. }
  1621.  
  1622. Chris.
  1623.  
  1624.  
  1625. ---
  1626.  * Origin: Plains BBS II : In The Heart Of The Garden City : (Opus 3:770/40ALL ME DIRECT ON 1-800-4-SEXUAL
  1627. PLEASE HAVE MASTERCARD 0R VISA READY. 
  1628. I WILL TALK TO YOU DIRECTLY.
  1629. THANKS,
  1630.            KEVIN CARTER
  1631.            SEXUAL ADVISOR
  1632.            GREG TAYLOR 876U\_[
  1633. --- QuickBBS v2.03
  1634.  * Origin: No Place Like Home 301-454-0360 (1:109/711)
  1635.  
  1636. *** There is a reply. See #79.
  1637.  
  1638.  
  1639. From:    Greg Taylor 
  1640. To:      Jf Messier<sysop>                        Msg #77, 04-Jan-88 08:41am
  1641. Subject: Re: Ultrix
  1642.  
  1643. FAG
  1644. FAG
  1645. FAG
  1646. FAG
  1647. FAGU L0>IJK %RFH&T$Y #"QASCWZDE"!                 Q
  1648. [\^@*]?[@*
  1649. ??*]
  1650.  ?> <M>MN B VC CXZXZA         !"!        "!        Q#"QA$EWZ%$#D 1       
  1651. 9^[0P,8@I1\_-/.        XZ,.MOI98P        X42QWZ/.0P*=@+[]^
  1652. Q"%!$WZR>0)<L+*?PO@X12Q        []\        ]\[        ][        []       \     
  1653. []\\[]        ZX?)<$*>O+ M7598US,INXY:1;[@0]
  1654.         _-/.2Q1A3\21WQ        ;:\^[@P 3
  1655. 123        
  1656. / \1        
  1657. 2/. L;P 
  1658. --- QuickBBS v2.03
  1659.  * Origin: No Place Like Home 301-454-0360 (1:109/711)
  1660.  
  1661. *** There is a reply. See #81.
  1662.  
  1663.  
  1664. From:    JF Messier 
  1665. To:      Paul Burke                               Msg #78, 02-Jan-89 10:23am
  1666. Subject: Re: TSR for Quick C
  1667.  
  1668. > > Please Someone tell me how to write a TSR program. I like
  1669. > > the C language
  1670. > > but i can't get the hang of writing the keep_dos. So
  1671. > > if anyone can help
  1672. >Paul,
  1673. >Writing a tsr is a little more complicated than just using keep_dos 
  1674. >(I lied its a LOT MORE COMPLICATED).  Get a Copy of Computer Language 
  1675. >Magazine for February 1988 (for Turbo C) or March 1988 (for MicroSoft C) 
  1676. >for a detailed analysis of how to write a TSR.
  1677. >Or, you could log onto PainFrame and search the C programming files for a 
  1678. >couple of file each of which allow you to write TSR without having to deal 
  1679. >with all the "gritty" details.  I don't remember the names of the files, 
  1680. >but there are clearly marked for TSR.
  1681. >roland 
  1682. >
  1683. >---
  1684.         There's a package named TESS which covers most interrupts you can want
  1685. to use in your programs and U can the files from many BBS'es. The files are:
  1686.  
  1687.               TESS-C.ARC   for 'C' programs
  1688.               TESS-A.ARC   for ASM programs
  1689.               TESS-P.ARC   for Turbo Pascal 4 and 5 programs
  1690.               TESS-DOC.ARC for the complete documentation
  1691.  
  1692.          I'm registered for that package. U can get the sources. Registering,
  1693. as for the sources costs $ 25.00. And then, it will cost U only $10.00 for a
  1694. complete upgrade. On CompuServe, there's a conference on that. GO CLMFOR.
  1695. All the name files can be obtained from there or can be freq'ed from my system
  1696. @ 1:163/210.0 2 get all the package, juste FReq TESS-ALL
  1697.                                                 ^^^^^^^^
  1698.  
  1699.                   Happy New Year............
  1700.  
  1701.  
  1702.  
  1703. --- msged 1.95S ZTC
  1704.  * Origin: SuperByte BBS  (1:163/210)
  1705.  
  1706.  
  1707. From:    Jf Messier<sysop> 
  1708. To:      Donley P'simer                           Msg #79, 22-Mar-95 09:17am
  1709. Subject: Re: TSR's & Command Line
  1710.  
  1711.  
  1712.  
  1713.  
  1714.        Great !!! Is there any TSR skeleton which can be used as the 
  1715.    general base for TSR programming using different INT ? I know that
  1716.    there's one for Turbo Pascal 3.0 : Stayres. I played with it for
  1717.    one year but since I'm now a 'C' fan, I cannot do anything in TSR.
  1718.  
  1719.    I have Quick 'C' AND CL 5.0 I will eventually order 5.1
  1720.  
  1721.                     Thanks a lot !!!
  1722.  
  1723.  
  1724.                  (MS) 'C' ya later....
  1725.  
  1726.  
  1727.  
  1728. ---
  1729.  * Origin: SuperByte BBS ╠═══ (819) 770-5163 ═══╣ (Opus 1:163/19)
  1730.  
  1731. *** This is a reply to #76.
  1732.  
  1733.  
  1734. From:    Jf Messier<sysop> 
  1735. To:      Jeffrey Nonken                           Msg #80, 22-Mar-95 09:21am
  1736. Subject: Re: Please recommend a good C Tutorial
  1737.  
  1738.  
  1739.  
  1740.  
  1741.     I downloaded a'C' tutorial 6 months ago. I'll check and give you
  1742.     the FREQ name. It was interesting. You can use it to create your
  1743.     own tutorial od sisplay system.
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749. ---
  1750.  * Origin: SuperByte BBS ╠═══ (819) 770-5163 ═══╣ (Opus 1:163/19)
  1751.  
  1752. *** There is a reply. See #105.
  1753.  
  1754.  
  1755. From:    Jf Messier<sysop> 
  1756. To:      Thomas Frost                             Msg #81, 22-Mar-95 09:24am
  1757. Subject: Ultrix
  1758.  
  1759.  
  1760.  
  1761.                     Enter the command : ps -a
  1762.  
  1763.         This will give you all the processes on the system. For having
  1764.   a list of YOUR processes, just enter : ps.
  1765.  
  1766.         In the list, you will have for each process a number. If you
  1767.   want to kill a proccess, just enter the command :
  1768.  
  1769.           kill <#>
  1770.   where <#> is the number you got from ps[-a]
  1771.  
  1772.  
  1773.  
  1774.  
  1775. ---
  1776.  * Origin: SuperByte BBS ╠═══ (819) 770-5163 ═══╣ (Opus 1:163/19)
  1777.  
  1778. *** This is a reply to #77.
  1779.  
  1780.  
  1781. From:    Larry Marshall 
  1782. To:      Patrick Wu                               Msg #82, 01-Jan-89 11:01am
  1783. Subject: Re: LEARNING C
  1784.  
  1785.  .>It is funny to see programmers play with words, since computer is so
  1786.  .>straight forward.  Anyway, it is purely personal taste whether one
  1787.  .>chooses to use debugger or not.  When I was taking courses at
  1788.  .>University of Houston.  The Operating Systems there takes an average
  1789.  .>of twice per person.
  1790.  .>
  1791.  . Boy, if you talk to your "straight forward" computer the way you
  1792. talk here I wonder what results you get.  I thought programmers were
  1793. known for their concern for syntax and proper language use, no matter
  1794. what the language.  I just applied for a job at the University of
  1795. Houston; does everybody write like that?  I wouldn't have mentioned it
  1796. except you seem to be taking George to task for proper use of the
  1797. English language. --- Larry
  1798. --- TBBS v2.0
  1799.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  1800.  
  1801. *** Part of a conversation.
  1802.  
  1803.  
  1804. From:    Ming Mar 
  1805. To:      Randall Greylock                         Msg #83, 02-Jan-89 04:41pm
  1806. Subject: Benchmarks!  please D
  1807.  
  1808. On Christmas Day you posted a message to Heikki Suonsivu in which
  1809. you say:
  1810.  
  1811.  > Hey, you don't suppose you can cut some of this crap out, could
  1812.  > you?
  1813.  > 
  1814.  > If I wanted to be in UseNet, I'd be in usenet.
  1815.  
  1816. Hmmm.  Santa must've put a lump of coal in somebody's stocking.
  1817.  
  1818.  
  1819. --- TPBoard 5.0 beta 2.0
  1820.  * Origin: ZAP   1rst TpBoard in Montreal,Quebec (514) 324-9031 (HST)
  1821. (1:167/136)
  1822.  
  1823. *** Part of a conversation.
  1824.  
  1825.  
  1826. From:    Bill Graham 
  1827. To:      Jon Guthrie                              Msg #84, 02-Jan-89 02:15pm
  1828. Subject: Re: FORMATTING OUTPUT
  1829.  
  1830.  
  1831.  
  1832.  JW>         Doesn't a double "%" mean write an actual "%" character to 
  1833.  JW> the screen?  I'd think you'd have the format string in a variable, 
  1834.  JW> and put the number in the string before output, the just pass the 
  1835.  JW> variable name instead of the string.
  1836.  
  1837. >No, what we're doing makes a different format string depending on the
  1838. >amount of precision you want.  For example, if digits=5, then the line
  1839. >sprintf(format,"%%10.%f",digits);
  1840. >means    format = "%10.5f"
  1841.  
  1842.  Assuming the variable 'digits' is a float equal to 5, then:
  1843.         sprintf(format,"%%10.%f",digits);
  1844.  means  format = "%10.5"
  1845.         (if 'digits' is not a float, compiler warning)
  1846.  
  1847.  what you really want is ('digits' is an int equal to 5):
  1848.         sprintf(format,"%%10.%df",digits);
  1849.  means  format = "%10.5f"
  1850.  
  1851.  Have to watch the %%'s.
  1852. --- TBBS v2.0
  1853.  * Origin: TechTalk BBS ,Titusville,FL,407-269-5188,4-HST's  (374/1)
  1854.  
  1855. *** This is a reply to #14.
  1856.  
  1857.  
  1858. From:    Braden Claxton 
  1859. To:      Jeff Bauer                               Msg #85, 04-Jan-89 07:58pm
  1860. Subject: Re: Non-ANSI C
  1861.  
  1862. What does the acronym AWK mean? I have never seen that one before.
  1863.                 Braden
  1864.  
  1865.  
  1866.  
  1867. ---
  1868.  * Origin: The Last Stop BBS Houston, Texas ->HST (713)664-0222 (Opus
  1869. 1:106/112)
  1870.  
  1871. *** Part of a conversation.
  1872.  
  1873.  
  1874. From:    Braden Claxton 
  1875. To:      Albert Dayes                             Msg #86, 04-Jan-89 08:03pm
  1876. Subject: Re: BITSET?
  1877.  
  1878. The term in C is bitfield.
  1879.         struct bits
  1880.                { unsigned first : 1;
  1881.                  unsigned second : 1;
  1882.                  unsigned another : 1;
  1883.                }    Braden[10];
  1884.  
  1885.  
  1886.  
  1887. ---
  1888.  * Origin: The Last Stop BBS Houston, Texas ->HST (713)664-0222 (Opus
  1889. 1:106/112)
  1890.  
  1891. *** There is a reply. See #171.
  1892.  
  1893.  
  1894. From:    Steve Isaacs 
  1895. To:      R.J. Devan                               Msg #87, 04-Jan-89 09:45pm
  1896. Subject: C for the IIGS
  1897.  
  1898. I don't have access to any reference material right now but you might look
  1899. into ORCA. I have used the ORCA Pascal and assembler packages with some
  1900. success although a little unwieldy at times but they do provide access to the
  1901. operating system and take advantage of the 65816 processor features. I haven't
  1902. been exposed to the C package for the ORCA environment but if its anything
  1903. like the Pascal its worth investigating. There are other packages available
  1904. but I have not had any experience with them.
  1905.  
  1906. Good luck... (spi)
  1907.  
  1908.  
  1909. --- Opus-CBCS 1.10.v
  1910.  * Origin: TouchStone HST: Elk Washington: Cold n Snow (1:346/1.0)
  1911.  
  1912. *** There is a reply. See #166.
  1913.  
  1914.  
  1915. From:    Steve Isaacs 
  1916. To:      Jose Bloise                              Msg #88, 04-Jan-89 09:52pm
  1917. Subject: WILDCAT! SysOp WANTED
  1918.  
  1919. I am not a sysop but do know of a fairly well run WildCat BBS in Spokane, WA
  1920. that you might try. Its called the Comfort Zone (509)467-6859. The sysop is
  1921. also running a closed BBS for the company that he works for to support
  1922. customers and outside programmers.
  1923.  
  1924. Later... (spi)
  1925.  
  1926.  
  1927. --- Opus-CBCS 1.10.v
  1928.  * Origin: TouchStone HST: Elk Washington: Cold n Snow (1:346/1.0)
  1929.  
  1930.  
  1931. From:    Joel Ward 
  1932. To:      Ron Dexter                               Msg #89, 03-Jan-88 12:16pm
  1933. Subject: Re: Turbo Pascal to Turbo C
  1934.  
  1935.         Actually, it should be quite easy since you're obvoiusly falmiliar
  1936. with the Turbo enviornment.  You'll be able to concentrate on learning the
  1937. language rather than the program.  Go for it.
  1938.  
  1939.    scuffling for a hat to eat.
  1940. .
  1941. Meanwhiwoes
  1942.  
  1943. [Him speamewhere in NJ -(201)539-5473- Probably too far to WOC!
  1944. (1:107/851)
  1945.  
  1946.  
  1947. From:    Joel Ward 
  1948. To:      Kiyoshi Akima                            Msg #90, 03-Jan-88 12:19pm
  1949. Subject: Re: HELP!!
  1950.  
  1951.  
  1952. me> 400K just to compile a "hello world" proo be another tmations with it
  1953. if you have the patience...
  1954.         - Joel
  1955. --- PeaceMail 2.03
  1956.  * Origin: Somewhere in NJ -(201)539-5473- Probably too far to WOC!
  1957. (1:107/851)
  1958.  
  1959.  
  1960. From:    Joel Ward 
  1961. To:      Bill Leary                               Msg #91, 04-Jan-88 02:39am
  1962. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  1963.  
  1964.         How about a simple
  1965. int     *i;
  1966. mpletely, who owns the rights
  1967.  > to the
  1968. C program
  1969. could be consigin: Somewhere in NJ -(201)539-5473- Probably too far to WOC!
  1970. (1:107/851)
  1971.  
  1972. *** Part of a conversation.
  1973.  
  1974.  
  1975. From:    Joel Ward 
  1976. To:      Chris Crowe                              Msg #92, 04-Jan-88 02:43am
  1977. Subject: Re: Blinking Cursor
  1978.  
  1979.         Use the cursor shape service of BIOS.  Just specify the beginning
  1980. line to be greate than than the ending line.  That'll make it invisible.
  1981.  
  1982.         - Joel
  1983. --- PeaceMail 2.03
  1984.  * Origin: Somewhere in NJ -(201)539-5473- Probably too far to WOC!
  1985. (1:107/851)
  1986.  
  1987. *** Part of a conversation.
  1988.  
  1989.  
  1990. From:    Joel Ward 
  1991. To:      Stephen Thompson                         Msg #93, 04-Jan-88 02:54am
  1992. Subject: Re: Turbo C
  1993.  
  1994.         Try using TCC rather than TC.
  1995.  
  1996. -Joel
  1997. --- PeaceMail 2.03
  1998.  * Origin: Somewhere in NJ -(201)539-5473- Probably too far to WOC!
  1999. (1:107/851)
  2000.  
  2001. *** Part of a conversation.
  2002.  
  2003.  
  2004. From:    Mike Housky 
  2005. To:      Patrick Wu                               Msg #94, 03-Jan-89 08:56pm
  2006. Subject: Re: Ctl-C/Break
  2007.  
  2008. > ... Anyway, how would you turn the control break off?
  2009. .
  2010. Well ... normally I wouldn't. I might intercept it with signal(SIGINT,xxx) if
  2011. the compiler supported it (as does MSC, TC2.0, Power C, etc.) This does not
  2012. prevent a "^C" from being echoed to the console by DOS, but Ctrl-Break is not
  2013. likely an accidental keystroke and a well-designed program will generally
  2014. honor a request to terminate gracefully.
  2015. .
  2016. P.S. I heard some time ago about some presumably legal method for avoiding the
  2017. ^C echo, using something called "40;33m Re: C AND UNIX
  2018.  
  2019.  RK> Yes, sh everyone here woulaven't had call to find out more about this (like I
  2020. said, it's not often that you need to worry about that little ^C.) Maybe
  2021. someone else will pipe up about it.
  2022.  
  2023.  
  2024. --- Opus 1.03b <> NoOrigin 3.1
  2025.  
  2026. --- ConfMail V3.31
  2027.  * Origin: Hog Heaven - 0.6 of a BBS in El Tor[1;40;33m    Zero Eagle 
  2028. Toon the 
  2029.  KA> co6m
  2030. e
  2031.  but40;36mFrom:    Mike Housky 
  2032. To:      Bob Stout                                Msg #95, 03-Jan-89 09:42pm
  2033. Subject: Re: Ctl-C/Break
  2034.  
  2035. [Patrick Wu:]
  2036. PW> Anyway, how would you turn the control break off?
  2037. .
  2038. > Well, under ZTC, you use:
  2039. >   void dos_set_cntl_break(int on_off);
  2040. >
  2041. > Bob (-: the sound you hear is a smug snicker :-) Stout
  2042. .
  2043. Smug? If that ZTC function doesn't refer to the extended break checking that
  2044. is already controlled by the BREAK command and some INT 21h subfunction that I
  2045. have no interest in looking up, then the next sound you hear will be me
  2046. scuffling for a hat to eat.
  2047. .
  2048. Meanwhiwoes
  2049.  
  2050. [Him speaking to whomever:]
  2051. 1.96S ZTC
  2052.  * Origin: The Mystic Court of 'C':    o memory
  2053. him> instead of just disk.
  2054. .
  2055. [Me speaking to him:]
  2056. me> Nahhh. The editor/compiler environment takes up over 400K ...
  2057. me> ... the same goes for QC interactive mode: both require over
  2058. me> 400K just to compile a "hello world" proo be another there with it that has the src. 
  2059.  
  2060. --- ConfMail V4.00
  2061.  * Origin: Treasure Isle Private Mail System (1:140/51)
  2062.  
  2063.  
  2064. From:    Grant Wagner 
  2065. To:      Paul Roub                                Msg #99, 03-Jan-89 05:23am
  2066. Subject: Re: QuickC 2.00
  2067.  
  2068.  
  2069.  > ->   2) When I compile something using Microsoft QuickC
  2070.  > 1.00, who owns
  2071.  > ->the .EXE file (or more completely, who owns the rights
  2072.  > to the
  2073. C program
  2074. could be considered a "derivative work based on the SOFTWARE 
  2075. (or MS RunTime Library in this case)".
  2076.  
  2077.    The only reason I wonder about this is because I may one day want 
  2078. to decide to sell my creation to someone, and I want to know that I am not
  2079. breaking any copyright laws by doing so (I also want to know that I won't owe
  2080. any money to MS for compiling the program using their program).
  2081.  
  2082.    ...Grant
  2083.  
  2084.  
  2085. ---
  2086.  * Origin: Negative Zone * 306-565-8538 (Opus 1:140/34)
  2087.  
  2088. *** Part of a conversation.
  2089.  
  2090.  
  2091. From:    Andy Brager 
  2092. To:      David Nugent                             Msg #100, 02-Jan-88 06:04pm
  2093. Subject: Re: Smaller Programs
  2094.  
  2095.  > There is a Unix utility (can't recall the exact name) which does EXACTLY
  2096.  > what you want.  You write and debug your code using a generic call to an
  2097.  > error function, looking something like:
  2098.  >       "error ("Press ESC to continue");"
  2099.  
  2100. It's either mkstr or xstr.
  2101.  
  2102. --- FD 2.0
  2103.  * Origin: What's the Point? (1:102/450.520)
  2104.  
  2105.  
  2106. From:    Tony Gentile 
  2107. To:      jim nutt                                 Msg #101, 04-Jan-88 09:03pm
  2108. Subject: Re: TC 2.0 woes
  2109.  
  2110. A side note to all this. Wouldn't it be REALLY nice if the bloody compiler
  2111. would insert a semicolon when you forget, instead of having to recompile the
  2112. whole thing? <grin>. Just something to think about!
  2113. --- QuickBBS v2.03
  2114.  * Origin: CC III 202/605 (619)566-1745 San Diego CA (1:202/605)
  2115.  
  2116. *** Part of a conversation.
  2117.  
  2118.  
  2119. From:    Jon Guthrie 
  2120. To:      Reiner Kunz                              Msg #102, 04-Jan-89 06:24am
  2121. Subject: Re: C AND UNIX
  2122.  
  2123.  RK> Yes, sh everyone here would not take me so
  2124. seriously.  It cramps my style.  He he he. 
  2125.  
  2126. Break on through, 
  2127.  
  2128. Rubens.  
  2129.  
  2130. --- ConfMail V3.31
  2131.  * Origin: PIER 146 "Floating On A Sea Of Canadian Beer" Montreal (1:167/146)
  2132.  
  2133. *** Part of a conversation.
  2134.  
  2135.  
  2136. From:    Zero Eagle 
  2137. Toon the 
  2138.  KA> compiler but generally)  argv[0] == NULL.
  2139. I think that you mean MS_DOS 3.0 and above. I know that it works in DOS 3.1,
  2140. and above.
  2141. - mike
  2142.  
  2143.  
  2144. --- msged 1.96S ZTC
  2145.  * Origin: The Mystic Court of 'C' (1:261/5015)
  2146.  
  2147. *** Part of a conversation.
  2148.  
  2149.  
  2150. From:    Mike Vore 
  2151. To:      Betsy Schwartz                           Msg #112, 06-Jan-89 01:02am
  2152. Subject: Re: C PROGRAMS
  2153.  
  2154.  BS> The traditional first C program is:
  2155.  BS>     #include <stdio>
  2156.  BS>     main()
  2157.  BS>     {
  2158.  BS>       printf("Hello, World!\n");
  2159.  BS>     }
  2160. In the DOS world make the #include read
  2161. #include <stdio.h>  We need extensions on our files!
  2162.  
  2163.  
  2164. --- msged 1.96S ZTC
  2165.  * Origin: The Mystic Court of 'C':    Jim Kanter 
  2166. To:      Russel Fouts                             Msg #113, 03-Jan-89 11:28am
  2167. Subject: AWK
  2168.  
  2169. Russell, there are two places to check.
  2170.  
  2171. First, the C User's Group has a public domain version of AWK available on
  2172. their disk # 236 (Highly Portable Utilities). You can send for it if you are a
  2173. member (US$20 for domestic US, US$ 30 for overseass.) Their address is:
  2174.         C Users Group
  2175.         Box 97
  2176.         McPherson, KS  67460  USA
  2177.  
  2178. Membership includes a subscription to their bi-monthly magazine which has some
  2179. very interesting articles and C CODE!
  2180.  
  2181. You can also contact Polytron Corporation in Oregon. They publish an AWK
  2182. interpreter with or without the book by the language's authors.
  2183.         Polytron Corporation
  2184.         1700 NW 167th Place
  2185.         Beaverton, OR  97006  USA
  2186.  
  2187. They also have other software packages that are of interest to many
  2188. programmers.
  2189.  
  2190. Hope this helps.  Jim.
  2191.  
  2192.  
  2193. ---
  2194.  * Origin: T.S.C. Norwalk,CT 203-854-9716; On the Sound! (Opus 1:141/245)
  2195.  
  2196.  
  2197. From:    Drew Moen 
  2198. To:      Charlie Milhans                          Msg #114, 04-Jan-89 09:14am
  2199. Subject: Re: Code Generators
  2200.  
  2201.  -> The 24 hour number for the Software Bottling Company is 1-800-872-8787. 
  2202.  -> Ask for Operator 311.  This is only and ordering line.  I purchased my 
  2203.  -> software direct.  The Software Bottling Company, 6600 Long Island Expy., 
  2204.  -> Maspeth, NY  11378  718-458-3700. They'll send you literature if you 
  2205.  -> want.  I was able to modify their templates so that it will incorporate 
  2206.  -> some of my C code instead of theirs.  It is really an amazing product 
  2207.  -> for the money.  I especially enjoy the ability to design screens and 
  2208.  -> fields with ease.  It will put all of the error checking in your code.  
  2209.  -> You can also specify input fields that will only take certain values 
  2210.  -> that you input as a list to softcode.  It generates pretty good code for 
  2211.  -> both Turbo C and Microsoft C.  Feel free to ask if you need any more 
  2212.  -> help.
  2213.  
  2214.   Is the product your talking about "SOFTCODE"?  If not what is it and how  
  2215. much?
  2216.                                        Drew Moen 362/101.6
  2217.  
  2218.  
  2219.  
  2220. --- msged 1.90S ZTC
  2221.  * Origin: M C A...... 'C'-ing our way in the DARK (fidonet 1:362/101.6)
  2222.  
  2223. *** Part of a conversation.;40;36m
  2224.  
  2225.  
  2226. From:    Jim Gates 
  2227. To:      Chris Crowe                              Msg #115, 05-Jan-89 08:50am
  2228. Subject: Re: Blinking Cursor
  2229.  
  2230. Did you try putting 2000H in CX?  This works for me.  If you still have
  2231. problems, let me know and I will put the code I use in my next message to you.
  2232.  
  2233.  
  2234. ---
  2235.  * Origin: MY BBS (Opus 1:124/6120)
  2236.  
  2237. *** This is a reply to #92.
  2238.  
  2239.  
  2240. From:    Chris Edwards 
  2241. To:      All                                      Msg #116, 05-Jan-89 12:24pm
  2242. Subject: .COM
  2243.  
  2244. DBASE ALLOWS THE LOADING OF USER DEFINED ROUTINES (COMMANDS) .  THEY SHOW HOW
  2245. TO WRITE ONE USING ASSEMBLY. THE REQUIREMENTS ARE AS FOLLOWS:
  2246.  
  2247. - IT MUST ORIGINATE THE FIRST EXECUTABLE INSTRUCTION AT AN OFFSET OF 
  2248. ZERO.
  2249.  
  2250. - THE PROGRAM MUSTNOT ALLOCATE OR USE MEMORY OVER AND ABOVE ITS ACTUAL 
  2251. SIZE.
  2252.  
  2253. - RETURN CONTROL TO DBASE USING A FAR RETURN.
  2254.  
  2255. - THE SHOW AN EXAMPLE USING MASM, LINK, AND THEN EXE2BIN.
  2256.  
  2257.  HOW CAN I PRODUCE EXE2BIN'ABLE' .EXE USING MICROSOFT C.????
  2258.  PLEASE HELP.!!!
  2259.  
  2260.  
  2261. ---
  2262.  * Origin: Alpha Centuari BBS -- WOC'n to the Stars! (Opus 1:124/1223)
  2263.  
  2264.  
  2265. From:    Jeff Bauer 
  2266. To:      Paul Allen                               Msg #117, 05-Jan-89 12:02pm
  2267. Subject: Re: zortech, c++
  2268.  
  2269. >How does c++ remain compatible with c?  Does it compile c++ source to
  2270. >c  source?  As in:  How would I get a Zortech c++ program to work
  2271. >with a C compiler on some foreign machine (say, a vax) if there is
  2272. >no c++ compiler  for it?
  2273. >
  2274. >Also, what exactly is object oriented programming?  Could this be in
  2275. >reference to, say, a pointer to something that could be either a data
  2276. >structure or a function and the object will describe itself?  What
  2277. >would be an example of non-object oriented programming?
  2278.  
  2279. 1)  C++ is a superset of the C language.
  2280. 2)  Some C++ compilers (Zortech) are native code compilers.  Others
  2281.     preprocess your code into C source, but the usually target a
  2282.     particular environment.
  2283. 3)  You wouldn't.
  2284. 4)  "The basic support a programmer needs to write object-oriented
  2285.     programs consists of a class mechanism with inheritance and a
  2286.     mechanism that allows calls of member functions to depend on the
  2287.     actual type of an object  (in cases where the actual type is
  2288.     unknown at compile time) ... facilities for supporting data
  2289.    abstraction techniques are important because the arguments for
  2290.     data abstraction and for its refinements to support elegant use
  2291.     of types are equally valid where support for object-oriented
  2292.     programming is available ... Object-oriented programming simply
  2293.     allows user-defined types to be far more flexible and general
  2294.     than the ones designed using only data abstraction techniques."
  2295.     (Bjarne Stroustrap:  "What is 'Object-Oriented Programming?'")
  2296. 5)  Sort of, but not quite.
  2297. 6)  Whatever method you're using now.
  2298.  
  2299. --- Via OpXpress V1.03ß
  2300.  * Origin: Southern Crossroads PEP and HST (1:124/4115.0)
  2301.  
  2302. *** Part of a conversation.
  2303.  
  2304.  
  2305. From:    Steve Jordan 
  2306. To:      Bob Stout                                Msg #118, 05-Jan-89 05:07pm
  2307. Subject: Re: Ctl-C/Break
  2308.  
  2309.  >        intdos(®s, ®s); 
  2310.  
  2311. Excuse me.  Why would a program compile and work in a Large model, comile and
  2312. fail in a medium model?  No machine language, but "int86dos" library calls. 
  2313. Actually, I am trying to interface with Btrieve.  I can give the symptoms, but
  2314. realistically, the return value from the int86 call is bad.  
  2315.  
  2316. (I am new to C.) 
  2317.  
  2318. --- ConfMail V3.31
  2319.  * Origin: Surf BBS - Lompoc, CA (1:102/2871)
  2320.  
  2321. *** Part of a conversation.
  2322.  
  2323.  
  2324. From:    Kevin Wang 
  2325. To:      Paul Schlyter                            Msg #119, 05-Jan-89 08:40am
  2326. Subject: re: Turbo vs. 2.0
  2327.  
  2328. SUBJECT: Don't forget Quick C....
  2329. >> Does anyone have good knowledge of Turbo C vs. 2.0?  Is it worth the
  2330. >> update or should I save some $$ ?   I use mostly the small and med.
  2331. >> models.  Thanks in advance for some input.
  2332. >
  2333. >The integrated debugger in TC 2.0 alone makes it worth the upgrade,
  2334. >according to my opinion.
  2335. >
  2336. >Then there's some other enhancements as well...
  2337.  
  2338. Let me ask this further question:  Do you remember absolutely all the
  2339. commands, and never have to look them up in the reference book?  Well, Quick C
  2340. has a neat function in it...put your cursor over a particular function, press
  2341. Shift-F1, and you will get a syntax/usage of that particular function.  One
  2342. neat thing that I'd like to see implemented in Quick C, tho are: (2 of them)
  2343. 1: Write marked block to disk
  2344. 2: Change variables on-the-fly (while stepping line-by-line through the code)
  2345.  
  2346. I am not sure if these have been put into newer versions of Quick C, as I am
  2347. still with V1.01 (basically, 1.0 with a few bug fixes: nothing new)
  2348.  
  2349. Kevin Wang
  2350.  
  2351. --- ConfMail V3.31
  2352.  * Origin: Carl's Corner; for FidoCon '89 | Carl Linden (1:143/1)
  2353.  
  2354. *** Part of a conversation.
  2355.  
  2356.  
  2357. From:    Ian Yokota 
  2358. To:      Renald Loignon                           Msg #120, 01-Jan-89 10:43am
  2359. Subject: Re: DR DOBBS, C LANG, AND COMM PROG
  2360.  
  2361. Thanks a lot I would realy apreciate it.
  2362. --- TBBS v2.0
  2363.  * Origin: C-PC  C'ing it at all hours.. 514 937-1857  (167/106)
  2364.  
  2365. *** This is a reply to #107.
  2366.  
  2367.  
  2368. From:    Larry Marshall 
  2369. To:      Joseph Mann                              Msg #121, 02-Jan-89 12:27pm
  2370. Subject: Re: QUICKC 2.00
  2371.  
  2372.  .>I just bought Let's C.  I think it sucks.  I am just a begining in C.
  2373.  .>I have been reading about all of these horrors about TC2.  Is QuickC
  2374.  .>any better or should I just stick with Lets C.  Has anybody ever heard
  2375.  .>of Lets C. If so give me a little input to what you all think.  I
  2376.  .>don't really know.  Personally I think it sucks. But I have never
  2377.  .>worked with the other compilers on the market so don't really know.
  2378.  .>
  2379.  . I don't want to defend TC2 but since you mention that you're just
  2380. beginning with C I assume you're new to Cecho as well.  ALL compilers
  2381. have bugs in them.  That may be the only statement one can make in
  2382. this echo without getting disagreement.  You'll find that each time a
  2383. major compiler manufacturer churns out a new release there will be a
  2384. whole bunch of "bug reports" and discussion.  Some of these can be
  2385. traced to operators used to other compilers or previous versions of
  2386. the compiler.  Some are undoubtedly real bugs in the compiler.  At
  2387. this time both Zortech C and Turbo C are in that "phase".  When Quick
  2388. C was released there were about a zillion "bug reports" generated
  2389. because you have to add functions to the primary library if you're
  2390. going to use them and that people found out that you could only use
  2391. the medium module from the environment.  This doesn't make the
  2392. compiler better or worse, just different.
  2393.  . Here's a "for instance" relative to TC2.  All the bug reports here
  2394. regarding fread() must have some merit.  On the other hand, I'm using
  2395. fread() in association with feof() in exactly the manner described by
  2396. those reporting bugs.  If I read the file in chuncks smaller than 512
  2397. bytes everything works fine.  If I define a buffer separately I can
  2398. read that same file in any size I choose.  The fread() quits at the
  2399. end of file everytime.  The programs have the same action with TC as
  2400. they do with ZTC.  As a beginner myself I certainly can't argue with
  2401. some of the heavy weights discussing this problem.  What I can tell,
  2402. however, is that it isn't causing problems in any of my code.---Larry
  2403.  
  2404. --- TBBS v2.0
  2405.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2406.  
  2407. *** Part of a conversation.
  2408.  
  2409.  
  2410. From:    Larry Marshall 
  2411. To:      Bill Leary                               Msg #122, 02-Jan-89 12:28pm
  2412. Subject: Re: SUBST, ADS
  2413.  
  2414. Now THAT is a very very good question. I've always wondered why I'm
  2415.  .>filling out these registration cards since, whever I call them, or do
  2416.  .>an upgrade, or whatever, they just ask me for a serial number. No
  2417.  .>check to look it up in the files, no "yep, we've got your registration
  2418.  .>right here". Nothing that I can detect from any of them.
  2419.  .>
  2420.  . When I called to upgrade from 1.5 to 2.0 the guy DID look me up in
  2421. the computer.  I was there 4 times.  He wasn't too sure why.  I do own
  2422. many of their products but one would think they'd keep track of
  2423. multiple entries.  At the same time he DID ask me for my serial number
  2424. hich, one would think, is staring him in the face.  The strange thing
  2425. to me is that, in spite of the fact that I've registered a bunch of
  2426. their products and my name was in the computer 4 times, I"ve never
  2427. received ANY information from them through the mail concerning
  2428. upgrades. --- Larry
  2429. --- TBBS v2.0
  2430.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2431.  
  2432. *** Part of a conversation.
  2433.  
  2434.  
  2435. From:    Larry Marshall 
  2436. To:      Bill Leary                               Msg #123, 02-Jan-89 12:27pm
  2437. Subject: Re: C PROGRAMS
  2438.  
  2439.  .>is the simplest one. However, the very simplest C program is actually :
  2440.  .>
  2441.  .>   main(){}
  2442.  .>
  2443.  .>which works just fine on every system I've tried and does exactly
  2444.  .>what you'd expect. Nothing.
  2445.  .>
  2446.  . Oh no, not again.  Now comes the flood of "no, you've got to put a
  2447. ";" in there for some compilers........ad nauseum.  As someone who can
  2448. remember starting out in C (as most of the people asking "what's the
  2449. simplest program" questions) I remember having this same thought.
  2450. I would bet that the question of "simplest program" from a beginner in
  2451. C has nothing to do with  main(){}.  If you think of it, every
  2452. beginner, no matter what compiler has seen the "hello world" example.
  2453. That IS NOT the question being asked and yet it generates a stream of
  2454. endless msgs regarding something that has little to do with
  2455. programming.  The next time you see such a question consider who's
  2456. asking it.  Most likely it's a beginner looking for a programming
  2457. project that won't get him in too much trouble with the language.
  2458. He's asking, is it easier to write an editor, database manager, etc.
  2459. than something else in C.  He wants something that won't get him in
  2460. too much trouble.  How many times would you have liked to tell
  2461. a beginner NOT to start learning C by trying to write TSRs?  Now's
  2462. your chance {grin}.---Larry
  2463. --- TBBS v2.0
  2464.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2465.  
  2466. *** Part of a conversation.
  2467.  
  2468.  
  2469. From:    Larry Marshall 
  2470. To:      Jimmie Mcdonald                          Msg #124, 02-Jan-89 12:28pm
  2471. Subject: Re: RE: PTR OPERATIONS, MEM MO
  2472.  
  2473.  .>The addition of the "near", "far", "cdecl", "pascal", etc. keywords is
  2474.  .>nonconforming. I think that they might (?) be conforming if they began
  2475.  .>with an underscore - but then again, I'm not so sure, because they
  2476.  .>change the code emitted by the compiler.
  2477.  .>
  2478.  . ANSI compliance is defined by the ability of the compiler to
  2479. compile ANSI compatible code correctly.  Extensions that the compiler
  2480. manufacturer adds to the compiler are irrelevant to this
  2481. definition. --- Larry
  2482. --- TBBS v2.0
  2483.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2484.  
  2485.  
  2486. From:    Larry Marshall 
  2487. To:      Jim Colligan                             Msg #125, 02-Jan-89 12:29pm
  2488. Subject: Re: C TUTORIAL
  2489.  
  2490.  .>I've owned Let's C 2.0 & 4.0, Turbo C 1.0, 1.5, & 2.0, and MSC 5.0
  2491.  .>w/Quick C 1.0. I've gotten rid of Let's C and Quick C and stuck with
  2492.  .>Turbo. Quick would be my second choice, although I haven't seen Power
  2493.  .>C or Zortech and those might work for me as well.
  2494.  .>
  2495.  . If this sort of proclamation was required with every recommendation
  2496. (or denegration) of a compiler, we'd all be better off. --- Larry
  2497. --- TBBS v2.0
  2498.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2499.  
  2500.  
  2501. From:    Larry Marshall 
  2502. To:      Stephen Thompson                         Msg #126, 02-Jan-89 12:29pm
  2503. Subject: Re: TURBO C
  2504.  
  2505.  .>Is there anyway that I can make a room needed for Turbo C (IBM)
  2506.  .>smaller... I keep running out of memory !!
  2507.  .>
  2508.  . What size room do you have it in now {grin}????  Seriously, you
  2509. might consider using the commandline version of the compiler rather
  2510. than the environment.  Using a small editor like QEdit you can run TCC
  2511. or MAKE from the editor and this setup will use considerably less
  2512. memory.
  2513.  .
  2514.  ---Larry "knew that large box of manuals would cause complaints"
  2515. --- TBBS v2.0
  2516.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2517.  
  2518. *** This is a reply to #93.
  2519.  
  2520.  
  2521. From:    Larry Marshall 
  2522. To:      Mike Housky                              Msg #127, 02-Jan-89 12:30pm
  2523. Subject: Re: UNION AND STRUCT
  2524.  
  2525.  .>You got it right both ways, the important one being that these are
  2526.  .>defaults which can be changed at compile time. Heh, does this mean
  2527.  .>that most TC users are running XT-class machines where word-alignment
  2528.  .>doesn't have a performance cost and MSC users are mainly running
  2529.  .>AT-class machines where word-alignment pays?
  2530.  .>
  2531.  . While I don't think you said what you meant (I think you meant that
  2532. XT machines see no performance BENEFIT), I thought I'd ask anyway.  Is
  2533. there a performance "cost" in some cases? --- Larry
  2534. --- TBBS v2.0
  2535.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2536.  
  2537. *** This is a reply to #23.
  2538.  
  2539.  
  2540. From:    Larry Marshall 
  2541. To:      Dana P'simer                             Msg #128, 02-Jan-89 12:30pm
  2542. Subject: Re: SUBJECT
  2543.  
  2544.  .>     A more apporpriate echo would be the EDITORS ECHO available at
  2545.  .>two nodes in Arizona ( I am not sure which ones ) and 2 nodes in
  2546.  .>Denver ( 104/45 and 104/63, (303)939-9272 ).
  2547.  .>
  2548.  . Do you know if this is ever going to make its way onto the
  2549. backbone?  There's been a lot of complaint about editor discussion
  2550. here but until an echo such as this becomes available I don't see how
  2551. it's supposed to be a substitute for a backbone echo.  Why ISN'T it on
  2552. the backbone?  Not enough interest??  I doubt it. --- Larry
  2553. --- TBBS v2.0
  2554.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  2555.  
  2556.  
  2557. From:    Eric Chan 
  2558. To:      All                                      Msg #129, 03-Jan-89 09:13pm
  2559. Subject: Directly to screen.
  2560.  
  2561. Hi,
  2562.  
  2563.         Does anyone know how to 'print' something directly on screen, 
  2564. I am not talking about using BIOS, is directly put the value in the screen
  2565. buffer.
  2566.  
  2567. Thanks.
  2568.  
  2569. Eric.
  2570.  
  2571. --- ConfMail V3.31
  2572.  * Origin: [ The Nameless BBS ] (416)638-7737 * (1:229/5)
  2573.  
  2574.  
  2575. From:    Zero Eagle 
  2576. To:      Daniel Lyke                              Msg #130, 03-Jan-89 03:43pm
  2577. Subject: Re: Code Generators
  2578.  
  2579.  "  > Thanks for the reply, but what I am looking for is a 
  2580.  "  > program which will allow me to paint screens, design 
  2581.  "  > data layouts and generate the code to create a new 
  2582.  "  > program.  I have heard a lot of good things about Pro C, 
  2583.  "  > but since they never advertize the price I assume it is 
  2584.  "  > astronomical. 
  2585.  "  
  2586.  " Pro C goes for somewhere in the $500 range, I think. It sounds
  2587.  " like you  should take a look at THEDRAW (THEDRAW*.ARC from
  2588.  " 1:362/101), which is a  shareware package that allows you to paint
  2589.  " screens, then save them in  a variety of formats (Various Binary,
  2590.  " ANSI, ASCII, etc). Then you could  write a routine to load those
  2591.  " screens (either from memory or disk), and  put in your own data
  2592.  " entry routines. It wouldn't be as easy as Pro C,  nor as complete
  2593.  " (Pro C does the database call up code and other stuff,  I've got
  2594.  " the demo disk around here somewhere), but it'd be a lot  cheaper.
  2595.  
  2596. Have you ever seen/used "The BOSS", a window library for 'C'?  It
  2597. works with MSC, Quick C, Turbo C, and a few others that have
  2598. slipped my memory.  The windowing part of the program is pretty
  2599. sophisticated (works on all screen types, uses layered windows, etc),
  2600. and the data-entry routines are great.
  2601.  
  2602. FReq. BOSS_???.ARC from 1:148/314 (8am -> Midnight ONLY) if you're
  2603. interested.
  2604.  
  2605. --- Ned 1.01
  2606.  
  2607. --- ConfMail V4.00
  2608.  * Origin: _*~ The Fowl Weather Post ~*_  &Fowl_Weather_Post=148314;  /* Opus
  2609. */ (1:148/314)
  2610.  
  2611. *** Part of a conversation.
  2612.  
  2613.  
  2614. From:    Bryan Ackermann 
  2615. To:      Jon Guthrie                              Msg #131, 04-Jan-89 12:54pm
  2616. Subject: Re: Turbo vs. 2.0
  2617.  
  2618. I believe that Turbo 2.0 is available in "regular" (no debugger) and
  2619. "professional" (debugger included) versions...
  2620.  
  2621.  
  2622. ---
  2623.  * Origin: Rymalee's Refuge (Opus 1:159/400)
  2624.  
  2625. *** Part of a conversation.
  2626.  
  2627.  
  2628. From:    Ted Carroll 
  2629. To:      Ron Warris                               Msg #132, 04-Jan-89 05:05pm
  2630. Subject: Re: gettext()
  2631.  
  2632. Ron - 
  2633.     Yes it is possible to use dynamic allocation for storage of the
  2634. information from gettext().  Actually on page 90 of the turbo C 1.5 manual
  2635. (2.0 works the same) is the formula bytes = (h rows) * (w .
  2636.                   bytes = rows * columns * 2; - if you want an explination of
  2637. why this is valid just drop me a line.  anyway then after 
  2638. you have the number of bytes required you can allocate them with malloc as
  2639. follows in this code fragment.
  2640. .
  2641. .
  2642.          if(!(ptr = (char *)malloc(bytes)))
  2643.          {
  2644.              printf("Put of memory error in window allocation\n");
  2645.              exit(1);
  2646.          }
  2647. .
  2648. .
  2649.          I'm glad that somebody else is using turbo C - it's great, and I
  2650. wouldn't trade it for 100 copies of MSC - if you have any other questions just
  2651. drop me a line.
  2652. .
  2653. .
  2654. .
  2655.                      Ted Carroll(a.k.a. Alexander Nevermind, Flyboy)
  2656.  
  2657.  
  2658.    
  2659.  
  2660.  
  2661.  
  2662.  
  2663. --- QM v0.17
  2664.  * Origin: /* The AULT-erNET Solution  (317)743-5441 HST  */ (1:201/40.0)
  2665.  
  2666. *** Part of a conversation.
  2667.  
  2668.  
  2669. From:    Ted Carroll 
  2670. To:      Bob Stout                                Msg #133, 04-Jan-89 05:27pm
  2671. Subject: Re: Ctl-C/Break
  2672.  
  2673. Bob -
  2674.     Does that actually disable the Ctl-C/Break of does that just "undo" what
  2675. break on does.
  2676.                          -Ted(a.k.a. Alexander Nevermind, Flyboy)
  2677.  
  2678.  
  2679.    
  2680.  
  2681.  
  2682.  
  2683.  
  2684. --- QM v0.17
  2685.  * Origin: /* The AULT-erNET Solution  (317)743-5441 HST  */ (1:201/40.0)
  2686.  
  2687. *** Part of a conversation.
  2688.  
  2689.  
  2690. From:    Richard Chadwell 
  2691. To:      Lyle V. Rains                            Msg #134, 04-Jan-89 10:50pm
  2692. Subject: Clean Code
  2693.  
  2694. Referencing your work, we liked what your into and have seen your
  2695. Clean Code and hope that you will contact us at (216) 449-6104 (V).
  2696.  
  2697.  
  2698. ---
  2699.  * Origin: PC-OHIO II HST (216-291-3048) (Opus 1:157/200)
  2700.  
  2701.  
  2702. From:    Bill Graham 
  2703. To:      Jeff Bauer                               Msg #135, 04-Jan-89 02:21pm
  2704. Subject: Re: NON-ANSI C
  2705.  
  2706. >I need to maintain compatible source between some ANSI and non-ANSI
  2707. >C environments...
  2708. >My approach would be to place the prototypes in the header files
  2709. >and use AWK to move the variables outside the function parentheses
  2710. >i.e.     int doit(int cnt, char *str) {
  2711. >             ...
  2712. >             }
  2713. >BECOMES  int doit() {
  2714. >             int cnt;
  2715. >             char *str;
  2716. >             ...
  2717. >             }
  2718. >Does anyone have a better idea?
  2719. >
  2720.    Perhaps I am missing something here. Those two functions are _not_
  2721. the same. The first function is passed two values. The second
  2722. function creates two automatic variables which are uninitialized
  2723. (not the same as as what seems to be the intent of the first function,
  2724. which is to be passed two values).
  2725.    Is there more happening here than concern with ANSI compatibility?
  2726.  
  2727.  
  2728. --- TBBS v2.0
  2729.  * Origin: TechTalk BBS ,Titusville,FL,407-269-5188,4-HST's  (374/1)
  2730.  
  2731. *** Part of a conversation.
  2732.  
  2733.  
  2734. From:    Martin Maney 
  2735. To:      Jeff Bauer                               Msg #136, 04-Jan-89 09:59am
  2736. Subject: Non-ANSI C
  2737.  
  2738.  JB> I need to maintain compatible source between some ANSI and non-ANSI
  2739.  JB> C environments.  The code hasn't been written yet  (thankfully I
  2740.  JB> get to plan ahead on this project), so I want to do it right.
  2741.  
  2742. You might want to dig up the July 88 issue of Computer Language: there's an
  2743. article about an ANSI compatible preprocessor.  This wouldn't solve all your
  2744. problems, but may be of value.  Executable for MS-DOS is said to be available
  2745. from the CL BBS (list in every issue) or their Compu$erve forum.  Sources
  2746. available from the authors (Steven Williams and Kent Williams).
  2747.  
  2748.     Brewster Station
  2749.     PO Box 8458
  2750.     Bridgeport, Conn. 06605
  2751.  
  2752. This doesn't directly address the prototype problem, but I think that having a
  2753. consistent preprocessor for the different compilation environments would also
  2754. be of great help in your endeavor.
  2755.  
  2756. /\/\artin    
  2757.  
  2758.  
  2759. --- msged 1.94S ZTC
  2760.  * Origin: Mind is Moving [Palatine, IL]  (1:115/790.3)
  2761.  
  2762. *** Part of a conversation.
  2763.  
  2764.  
  2765. From:    Bob Stout 
  2766. To:      Paul Allen                               Msg #137, 05-Jan-89 09:00pm
  2767. Subject: zortech, c++
  2768.  
  2769. Paul...
  2770.  
  2771.   C++ is a superset of ANSI (as proposed) C. A C++ compiler will compile a C 
  2772. program, but not vice versa. Most current implementations of C++ are, in fact,
  2773. merely preprocessors that turn C++ source code into C source code. The Zortech
  2774. C++ compiler for PC's is one the first native code C++ compilers available.
  2775.  
  2776.   Object-oriented programming is a philosophy that providse for a greater 
  2777. degree of data abstraction than is possible with non-OOPS languages such as C.
  2778. Or another way of looking at it is that Forth and other languages made 
  2779. "extensible" a dirty word when used to describe a programming language, so 
  2780. once the rest of the world caught on that it's really a good idea if done with
  2781. a little discipline, they had to think of something else to call it! 
  2782.  
  2783. --- msged 1.96S ZTC
  2784.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2785.  
  2786. *** Part of a conversation.
  2787.  
  2788.  
  2789. From:    Bob Stout 
  2790. To:      Braden Claxton                           Msg #138, 05-Jan-89 09:13pm
  2791. Subject: Re: Non-ANSI C
  2792.  
  2793. In a message of <04 Jan 89 20:58:09>, Braden Claxton (1:106/112) writes:
  2794. >What does the acronym AWK mean? I have never seen that one before.
  2795.  
  2796. Braden...
  2797.  
  2798.   AWK is a text processing language written by messrs. Aho, Weinberger, and  
  2799. Kernighan (the `K' of K&R) - ergo "AWK". 
  2800.  
  2801. --- msged 1.96S ZTC
  2802.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2803.  
  2804. *** Part of a conversation.
  2805.  
  2806.  
  2807. From:    Bob Stout 
  2808. To:      Jon Guthrie                              Msg #139, 05-Jan-89 09:14pm
  2809. Subject: Re: Linefeed in TurboC
  2810.  
  2811. In a message of <01 Jan 89 20:29:01>, Jon Guthrie (1:14/627) writes:
  2812. >If the run-time library converts all the LineFeed characters (people
  2813. >keep referring to them as 'Newline' characters, but none of my ASCII
  2814. >tables has any character named NewLine in them) to CR/LF pairs, then
  2815. >your bit of subterfuge will not work, either.
  2816.  
  2817. Jon...
  2818.  
  2819.   <sigh> You're right of course - Oh well, every so often (some would say all 
  2820. too often or even most of the time) I start getting careless and rattling off 
  2821. gibberish off the top of my head. 
  2822.  
  2823. --- msged 1.96S ZTC
  2824.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2825.  
  2826. *** There is a reply. See #159.
  2827.  
  2828.  
  2829. From:    Bob Stout 
  2830. To:      Larry Marshall                           Msg #140, 05-Jan-89 09:19pm
  2831. Subject: Re: LEARNING C
  2832.  
  2833. In a message of <01 Jan 89 11:01:55>, Larry Marshall (1:240/1) writes:
  2834. LM> I just applied for a job at the University of Houston; does everybody
  2835. LM> write like that?
  2836.  
  2837. Larry...
  2838.  
  2839.   You think we write funny, wait til you hear us! :-) Anyway, if you get the 
  2840. job or even get to fly in for an interview, give me a call (i.e. have your 
  2841. machine call my machine, we'll do lunch :-)
  2842.  
  2843.   BTW, I just talked to Steve Margison this evening and it appears the ZTC++ 
  2844. library is a go. I'm going to send him off a couple of revisions this weekend 
  2845. along with some notes and revised documentation and will try to get you a copy
  2846. off as well. After that, give him a few weeks for his wife to get over her 
  2847. surgery and it should be about ready for all the Zortechies of the world! 
  2848.  
  2849. --- msged 1.96S ZTC
  2850.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2851.  
  2852. *** Part of a conversation.
  2853.  
  2854.  
  2855. From:    Bob Stout 
  2856. To:      Ming Mar                                 Msg #141, 05-Jan-89 09:38pm
  2857. Subject: Benchmarks!  please D
  2858.  
  2859. In a message of <02 Jan 89 17:41:27>, Ming Mar (1:167/136) writes:
  2860. >On Christmas Day you posted a message to Heikki Suonsivu in which
  2861. >you say:
  2862. > > Hey, you don't suppose you can cut some of this crap out, could
  2863. > > you?
  2864. > > 
  2865. > > If I wanted to be in UseNet, I'd be in usenet.
  2866. >Hmmm.  Santa must've put a lump of coal in somebody's stocking.
  2867.  
  2868. Ming...
  2869.  
  2870.   Obviously you don't know Randall as we do - Santa doesn't go down this guy's
  2871. chimney, he heads straight for the coal chute! :-) 
  2872.  
  2873. --- msged 1.96S ZTC
  2874.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2875.  
  2876. *** This is a reply to #83.
  2877.  
  2878.  
  2879. From:    Bob Stout 
  2880. To:      Bill Leary                               Msg #142, 05-Jan-89 09:28pm
  2881. Subject: Re: CTL-C/BREAK
  2882.  
  2883. Bill...
  2884.  
  2885.   Quite true - which is why signal() or specialized ctrl-break handlers are 
  2886. still the preferred route. 
  2887.  
  2888. --- msged 1.96S ZTC
  2889.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2890.  
  2891. *** Part of a conversation.
  2892.  
  2893.  
  2894. From:    Bob Stout 
  2895. To:      Bill Leary                               Msg #143, 05-Jan-89 09:29pm
  2896. Subject: Re: PRODUCTIVITY
  2897.  
  2898. Bill...
  2899.  
  2900.   In a world of BBS's, one of the greatest advantages of the .COM format is 
  2901. its physically smalller size which translates into faster downloads. 
  2902.  
  2903. --- msged 1.96S ZTC
  2904.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  2905.  
  2906. *** Part of a conversation.
  2907.  
  2908.  
  2909. 0;36mFrom:    Rick Roth 
  2910. To:      All                                      Msg #144, 04-Jan-89 03:07pm
  2911. Subject: Terminfo curses
  2912.  
  2913. Hy there i was wondering is someone can help me with a problem I am having
  2914. with terminfo curses.  How can you send 8 bit characters to the
  2915. terminal. In the example below under termcap curses calling the function
  2916. outlines the window in IBM type graphic characters, under terminfo curses
  2917. the output has the 8th bit stripped giving inverted alpha numeric characters.
  2918. void ibm_box(win)
  2919. WINDOW *win;
  2920. {
  2921.   box(win,179,196);
  2922.   mvwaddch(win,0,0,218);
  2923.   mvwaddch(win,0,win->_maxx-1,191);
  2924.   mvwaddch(win,win->_maxy-1,0,192);
  2925.   mvwaddch(win,win->_maxy-1,win->_maxx-1,217);
  2926. }
  2927. If anyone can help it would be appreciated.
  2928. Thanks Rick Roth
  2929.  
  2930. --- ConfMail V4.00
  2931.  * Origin: TECHbooks_One, Portland, OR +1(503)760-1473 G (1:105/4)
  2932.  
  2933.  
  2934. From:    Gary Lau 
  2935. To:      Martin Pollard                           Msg #145, 04-Jan-89 05:24pm
  2936. Subject: Re: Mix Power C
  2937.  
  2938. >Howdy, all.  I'm new to the C Echo (but only relatively new to C), and 
  2939. >I've got some questions.  Who amongst you uses Power C from Mix Software? 
  2940.  
  2941. I do!
  2942.  
  2943. > I have a few stumpers about it:
  2944. >1)  My version of the compiler is 1.16.  Is there a later version out?
  2945. >    I didn't get a registration card of any kind with mine (purchased
  2946. >    directly from Mix), and I haven't been notified of any changes.
  2947.  
  2948. I didn't get any registration card of any type either.  The version I
  2949. received just before the Christmas holidays is 1.2.0
  2950.  
  2951. >2)  Has anyone been able to compile using the small and large memory
  2952. >    models?  I can only compile with the medium model.  In fact, I can
  2953. >    recall a review in one of the big magazines in which the reviewer
  2954. >    stated that he couldn't get small/large to work, either.
  2955.  
  2956. I've been able to compile in the small model.  Haven't tried compiling
  2957. in the large model.  Were you getting error messages?
  2958.  
  2959. >3)  How do you feel about Power C?  Likes?  Dislikes?
  2960.  
  2961. The only C compilers I've used is Power C and TC 2.0.  My background in
  2962. C is limited so I'm not in a position to fully comment on Power C.  I
  2963. have read that Power C is a not a good compiler to use for heavy duty
  2964. programming.  But, I do like the Power C manual.
  2965.  
  2966. --- Via OpXpress V1.03ß  Ahead Warp 1 with Opus Xpress!
  2967.  * Origin: House Atreides (818)965-7220HST  (1:103/602)
  2968. *** Part of a conversation.
  2969.  
  2970.  
  2971. From:    Henry Piper 
  2972. To:      Bob Stout                                Msg #146, 05-Jan-89 05:50pm
  2973. Subject: ZortechC
  2974.  
  2975. I finally got hold of Sam at Zortech, he got everything straightend out with
  2976. no problems. I guess I'm going to have to find room for ZTC on my hard disk
  2977. again. P.S. How do you like your BBS.
  2978.  
  2979.  
  2980. --- Opus-CBCS 1.10.v
  2981.  * Origin: Crystal Palace  The Ghost in the Machine  (1:382/1.0)
  2982.  
  2983.  
  2984. From:    Roland Brown 
  2985. To:      Bryan Ackermann                          Msg #147, 06-Jan-89 02:27pm
  2986. Subject: Re: Turbo vs. 2.0
  2987.  
  2988.  > I believe that Turbo 2.0 is available in "regular" (no
  2989.  > debugger) and "professional" (debugger included) versions...
  2990.  >
  2991.  >
  2992.  
  2993. Turbo 2.0 "Regular" to use your term DOES have a debugger for the integrated
  2994. enviornment.  It is "slightly" limited compared stand alone debugger that
  2995. comes with the Professional version.  The professional version also includes
  2996. TASM which is the Turbo Assembler.  From what I have seen the Integrated
  2997. debugger is more than sufficient for most projects. The standalone is
  2998. unbelievable with options to debug:
  2999.  
  3000. Codeview modules
  3001. virtural modes for 80386 machines
  3002. remote debugging over serial port with a second computer
  3003.  
  3004. and a bunch of other "Bells and Whistles"
  3005.  
  3006. roland 
  3007.  
  3008. ---
  3009.  * Origin: Sky Pilot Point Mail Box Off 261/1004 (Opus 1:26102/4)
  3010.  
  3011. *** Part of a conversation.
  3012.  
  3013.  
  3014. From:    Bob Stout 
  3015. To:      Mike Housky                              Msg #148, 06-Jan-89 07:51am
  3016. Subject: Re: Ctl-C/Break
  3017.  
  3018. In a message of <03 Jan 89 22:42:43>, Mike Housky (1:103/522.6) writes:
  3019. > I suspect the next sound I'll hear will be a loud blush from the Great 
  3020. > Soutwest!
  3021.  
  3022. Mike...
  3023.  
  3024.   My blushes may be colorful, but rarely noisy! :-) Seriously, the ZTC 
  3025. dos_set_cntl_break() is exactly as you suspect - it calls DOS (hence the "dos"
  3026. in its name) to enable/disable Ctrl-Break checking. This is exactly what I 
  3027. understood Patrick to want. It may be more robust to intercept the Ctrl-Break 
  3028. interrupt (even with a do-nothing handler), but that isn't what I understood 
  3029. he wanted.
  3030.  
  3031. Bob (color me still blushless) Stout 
  3032.  
  3033. --- msged 1.96S ZTC
  3034.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  3035.  
  3036. *** Part of a conversation.
  3037.  
  3038. From:    Bob Stout 
  3039. To:      Mike Housky                              Msg #149, 06-Jan-89 08:02am
  3040. Subject: Re: TC 2.0 woes
  3041.  
  3042. Mike...
  3043.  
  3044.   TCC (command line TC) doesn't "degrade gracefully", it merely takes larger 
  3045. programs to get an "out of memory" error.  
  3046.   ______________________
  3047.  /__ __ __     __
  3048.  __/ / /_/ /_/ /
  3049. /_____________________________________
  3050.  
  3051.  
  3052. --- msged 1.96S ZTC
  3053.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  3054.  
  3055. *** Part of a conversation.
  3056.  
  3057.  
  3058. From:    Bob Stout 
  3059. To:      Larry Marshall                           Msg #150, 06-Jan-89 08:06am
  3060. Subject: Re: C PROGRAMS
  3061.  
  3062. In a message of <02 Jan 89 12:27:53>, Larry Marshall (1:240/1) writes:
  3063. >He's asking, is it easier to write an editor, database manager, etc.
  3064. >than something else in C.  He wants something that won't get him in
  3065. >too much trouble.  How many times would you have liked to tell
  3066. >a beginner NOT to start learning C by trying to write TSRs?  Now's
  3067. >your chance {grin}.---Larry
  3068.  
  3069. Larry...
  3070.  
  3071.   Frankly, my urge, when I see these "simplest program" messages, is to 
  3072. suggest they write a real-time, multi-user, multitasking operating system! At 
  3073. least it would give them something to do for a few years besides enter 
  3074. insipid, pointless messages here for the rest of us to groan and wade through.
  3075.  
  3076. Bob (main() { printf("Say \"goodbye, world\"!\n"); }) Stout 
  3077.  
  3078. --- msged 1.96S ZTC
  3079.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  3080.  
  3081. *** Part of a conversation.
  3082.  
  3083.  
  3084. From:    Bob Stout 
  3085. To:      Ted Carroll                              Msg #151, 06-Jan-89 08:14am
  3086. Subject: Re: Ctl-C/Break
  3087.  
  3088. In a message of <04 Jan 89 18:27:53>, Ted Carroll (1:201/40) writes:
  3089. >    Does that actually disable the Ctl-C/Break of does that just "undo" 
  3090. >what break on does.
  3091.  
  3092. Ted...
  3093.  
  3094.   It's just a handy way of doing "BREAK ON" or "BREAK OFF" from within a 
  3095. program - which is sometimes all you need or want. 
  3096.  
  3097. --- msged 1.96S ZTC
  3098.  * Origin: Stoutbound Traffic (Imagine a witty phrase here)  (1:106/506.6)
  3099.  
  3100. *** Part of a conversation.
  3101.  
  3102.  
  3103. From:    John Moore 
  3104. To:      All                                      Msg #152, 05-Jan-89 06:30pm
  3105. Subject: Windchill
  3106.  
  3107. I have lost the name of the person wanting a windchill formula, but maybe this
  3108. will help:
  3109.  
  3110.  
  3111. #include <math.h>
  3112.  
  3113. float wind_chill(int wind_speed, int temp
  3114. {
  3115.    return (((10.45 + (6.686112 * sqrt((double) wind_speed))
  3116.      - (.447041 * wind_speed)) / 22.034 * (temp - 91.4)) + 91.4);
  3117. }
  3118.  
  3119.  
  3120. --- Opus-CBCS 1.10.v
  3121.  * Origin: Centurion OPUS/HST, Stone Mountain, GA (1:133/302.0)
  3122.  
  3123. *** Part of a conversation.
  3124.  
  3125.  
  3126. From:    Joubert Berger 
  3127. To:      All                                      Msg #153, 02-Jan-89 12:59pm
  3128. Subject: declaring variables
  3129.  
  3130. I have a question.  Is it possible to declare a variable at an absolute
  3131. address  -- in Modula2 you can say "screen[b800h]" to have the variable 
  3132. screen located at b800.  Can this be done in C?
  3133.                                        Joubert
  3134.  
  3135.  
  3136. --- Opus-CBCS 1.10.v
  3137.  * Origin: NASPA Systems SE  Hayes 9600  404/441-1431 (1:133/301.0)
  3138.  
  3139. *** There is a reply. See #192.
  3140.  
  3141.  
  3142. From:    Tom Vaughan 
  3143. To:      Bill Leary                               Msg #154, 05-Jan-89 10:20pm
  3144. Subject: ESCAPE CODES TO PRINTER
  3145.  
  3146.  
  3147.      Bill, while recreating the code that locks up my printer, I was able to
  3148. correctly answer my own question. 
  3149.  
  3150.      #include<stdio.h>
  3151.      main()
  3152.      {
  3153.           fprintf(stdprn,"\33\105");
  3154.           fprintf("this text will be EMPHASIZED");
  3155.      }
  3156.  
  3157.      Thanks for your reply.
  3158.  
  3159.  ---- Tom
  3160.  
  3161. --- via XRS 0.99
  3162.  * Origin: From the Harbor in Charleston -- Tom Vaughan (TComm 1:372/888.22)
  3163.  
  3164.  
  3165. From:    Paul Roub 
  3166. To:      Randall Smith                            Msg #155, 06-Jan-88 01:09am
  3167. Subject: Re: Debugger.
  3168.  
  3169. -> DN> I would state that their is NO professional programming 
  3170. project 
  3171. ->today that  DN> doesn't use a debugger, if one is available. Period.
  3172. ->How about Lotus 123 Version 3.0?  <BIG grin> Later...    Randy.    
  3173. ->Lotus 123 Version 3.0  >>someday. 
  3174. ->
  3175. well - it's not that they don't WANT to use a debugger - they just
  3176. can't find one with negative memory requirements!
  3177.                                                                 -paul
  3178.  
  3179.  
  3180. --- Via OpXpress V1.03ß  Paul Roub and his all-girl orchestra
  3181.  * Origin: MOBS_Opus_Humor_South~Only you can prevent Echo Fires (Opus
  3182. 1:135/47)
  3183.  
  3184. *** Part of a conversation.
  3185.  
  3186.  
  3187. From:    Dan Norstedt 
  3188. To:      Mike Housky                              Msg #156, 03-Jan-89 02:26pm
  3189. Subject: Re: Debug info packing
  3190.  
  3191.  > ... and ever since MS LINK started supportiing automatic
  3192.  > packing with /EXEPACK I haven't paid much attention to it.
  3193.  
  3194. Note that EXEPACK and LINK /EXEPACK doesn't give identical results
  3195. (with EXEPACK marginally better). Don't know why, just observed it.
  3196.  
  3197. You have found out to use the LINK switches /FAR and /PACK for production
  3198. code, though? (If not, try it. It's only a few % and only has effect on
  3199. medium model and up, but it's for free.)
  3200.  
  3201.  
  3202. --- ConfMail V4.00
  3203.  * Origin: Dan Norstedt, Stockholm - Sweden (2:202/204.2)
  3204.  
  3205.  
  3206. From:    Dan Norstedt 
  3207. To:      Chris Crowe                              Msg #157, 03-Jan-89 03:24pm
  3208. Subject: Re: drive check -- orig 11/4/88
  3209.  
  3210.  > Do you know how to determine if the drive is assigned or subst?
  3211.  
  3212. You probably can't. But I fail to see when it's necessary to detect, because
  3213. far as I can see, you can ask DOS about the assigned or subst drive just as
  3214. well as the real drive.
  3215.  
  3216.  > Some program would do catastropic things if you tried to read and write
  3217. > from drives that don't really exist.
  3218.  
  3219. Well, I don't think to highly of programs that blow up when a floppy door
  3220. is opened when it's running. I think the solution is in trapping the errors,
  3221. instead of imposing static environments.
  3222.  
  3223.  > Does anyone else have a routine to detemine if a drive exists?. How about a
  3224.  > person from MICROSOFT, any here?, do you have an answer?
  3225.  
  3226. DOS have a routine that (among other things) can tell you if a drive is VALID.
  3227. Read the docs for int 0x21, function 0x29.
  3228. I have published a routine in this echo that determined if a drive is READY,
  3229. using only documented DOS calls. If you can't find it, maybe I can rerun them.
  3230.  
  3231.  
  3232. --- ConfMail V4.00
  3233.  * Origin: Dan Norstedt, Stockholm - Sweden (2:202/204.2)
  3234.  
  3235.  
  3236. From:    Mats Wallin 
  3237. To:      Mats Sjoblom (Sesam Pryo)                Msg #158, 03-Jan-89 07:55pm
  3238. Subject: DMS/32
  3239.  
  3240. Congratulations to your success :-)
  3241.  
  3242.  > and a relation database manager written in Cobol, with no C
  3243.  
  3244. I thought it was written in Pascal, that's what you told me. (And a database
  3245. manager, written in Pascal, with no Pascal interface :->
  3246.  
  3247. /mats
  3248.  
  3249. --- FD TosScan .15
  3250.  * Origin: Mats Wallin - Telsoft - Stockholm - Sweden (2:202/204.3)
  3251.  
  3252.  
  3253. From:    Mats Wallin 
  3254. To:      Mike Housky                              Msg #159, 03-Jan-89 08:06pm
  3255. Subject: Re: Linefeed in TurboC
  3256.  
  3257.  > formfeed character (^J, 0x0A)
  3258.  
  3259. FormFeed = ^L = 0x0C
  3260. LineFeed = ^J = 0x=A
  3261.  
  3262.  
  3263. /mats
  3264.  
  3265. --- FD TosScan .15
  3266.  * Origin: Mats Wallin - Telsoft - Stockholm - Sweden (2:202/204.3)
  3267.  
  3268. *** Part of a conversation.
  3269.  
  3270.  
  3271. From:    Gottfried Ganssauge 
  3272. To:      Petri Helenius                           Msg #160, 02-Jan-89 10:37am
  3273. Subject: Re: Packing Structures
  3274.  
  3275.  >   68020 aligns to word, not longword. 68020 can address longwords
  3276.  > equally
  3277.  > efficent at word and longword boundaries, so there is really no need to
  3278.  > align to longwords! I don't know about 80386, because I don't do
  3279.  
  3280. MC68020 User's Manual 2nd Edition page 5-10:
  3281. "Some performance degradation can occur due to the multiple bus accesses that
  3282. the MC68020 must make when long word (word) operand accesses do not fall on
  3283. longword (word) boundaries."
  3284.  
  3285. Hope that clears things up,
  3286.  
  3287.                 Ciao, Gottfried
  3288.  
  3289. --- ConfMail V4.00
  3290.  * Origin: Gotti's AT (2:245/1000.35)
  3291.  
  3292.  
  3293. From:    Felix Kasza 
  3294. To:      Robert Mccullough                        Msg #161, 03-Jan-89 02:59pm
  3295. Subject: Re: Interfaces
  3296.  
  3297.  RM> [...] The second is C-Tree by Faircom.  This is a B-TREE file system in 
  3298.  RM> C. [...] All you do is compile it under your favorite compiler. 
  3299.  
  3300.     While I like c-tree very much, I cannot fully agree with you. The set
  3301. functions are rudimentary to non-existent (although r-tree does some cute
  3302. tricks in that direction), and the 8-bit character handling (for key sorting)
  3303. is as much a mess as is the parameter file stuff for the ISAM routines.
  3304.  
  3305.     But otherwise, it really is a fine product.
  3306.  
  3307.     Felix.
  3308.  
  3309.  
  3310. --- msged 1.943L MSC
  3311.  * Origin: The Beast (fidonet 2:310/11)
  3312.  
  3313.  
  3314. From:    Felix Kasza 
  3315. To:      All                                      Msg #162, 03-Jan-89 03:06pm
  3316. Subject: Greg McCann's netmail address
  3317.  
  3318.  
  3319.     Sorry to bother you with an off-topic message, but I desperately need Greg
  3320. McCann's netmail address (somewhere in Chattanooga, TN?), and he hasn't shown
  3321. up lately. If you do know it, please send netmail ... one off-topic msg is
  3322. enough.
  3323.  
  3324.     Thanks a lot,
  3325.  
  3326.     Felix.
  3327.  
  3328. --- msged 1.943L MSC
  3329.  * Origin: The Beast (fidonet 2:310/11)
  3330.  
  3331.  
  3332. From:    Felix Kasza 
  3333. To:      Elizabeth Elliott                        Msg #163, 04-Jan-89 10:44pm
  3334. Subject: MSC execl() with DOS 2.x
  3335.  
  3336. In a message of <31 Dec 88 21:16:12>, Elizabeth Elliott (1:106/112) writes:
  3337.  
  3338. [About problems executing other programs]
  3339.  
  3340.     Elizabeth,
  3341.  
  3342.     there is always an elegant method (exec..(), in this case), and then
  3343. there's the Microsoft-required method. If you really can't get it to work with
  3344. Macro-Cruft's Dumb Offending System 2.xx, you might try the following: Invoke
  3345. your program from a batch file; then scan the batch file for the line where
  3346. your program is invoked; then advance to the start of the next line; truncate
  3347. there; and append the command lines for whatever else you want to do. This
  3348. should do the trick, and, yes, this kludge is about as crufty as kludges can
  3349. get. Makes you [how do you say "throw up" in a polite way?] ... but then so
  3350. does MS-DOS :-)
  3351.  
  3352.     Felix.
  3353.  
  3354. P.S.: Reconsidering, please delete the smiley face after "MS-DOS": I believe
  3355. it's not a joke but the bitter truth.
  3356.  
  3357. --- msged 1.96S ZTC
  3358.  * Origin: The Beast (fidonet 2:310/11)
  3359.  
  3360.  
  3361. From:    Felix Kasza 
  3362. To:      Daniel Lyke                              Msg #164, 04-Jan-89 10:58pm
  3363. Subject: Re: Reverse-Video
  3364.  
  3365. In a message of <31 Dec 88 01:39:34>, Daniel Lyke (1:362/101.2) writes:
  3366.  
  3367. [To change video attribs]
  3368.  
  3369. >char far *screen = (char far *)0xb8000000;
  3370.  
  3371. >for(i=0;i<8192;i+=2) screen[i] ^= (char)(0xff);
  3372.  
  3373.     Now I might be wrong, but I think your last statement should read:
  3374.  
  3375.     for ( i = 1; i < 4000; i += 2 )
  3376.          screen[i] ^= '\377';
  3377.  
  3378.     First, attributes occupy the *high* byte -- that's why my loop starts at
  3379. 1, so it processes attribs instead of characters; and second, the screen
  3380. (usually!) is 80*25*2 bytes long == 4000. Anyway, you shouldn't hard-code that
  3381. stuff but query the OS/BIOS/whatever for screen mode (gives you the base
  3382. address) and screen size.
  3383.  
  3384.     Felix.
  3385.  
  3386. --- msged 1.96S ZTC
  3387.  * Origin: The Beast (fidonet 2:310/11)
  3388.  
  3389.  
  3390. From:    Felix Kasza 
  3391. To:      Dan Norstedt                             Msg #165, 05-Jan-89 12:09am
  3392. Subject: far *
  3393.  
  3394. In a message of <01 Jan 89 20:16:40>, Dan Norstedt (2:202/204.2) writes:
  3395.  
  3396. >In a OS/2 device driver, selector 0x0040 is always pointing on physical
  3397. >address 0x000400... <keeping a strait face> OS/2 isn't PC-specific...
  3398.  
  3399. You mean you still haven't trashed your copy?
  3400.  
  3401.     Felix.
  3402.  
  3403. --- msged 1.96S ZTC
  3404.  * Origin: The Beast (fidonet 2:310/11)
  3405.  
  3406.  
  3407. From:    Reiner Kunz 
  3408. To:      R.j. Devan                               Msg #166, 05-Jan-89 01:31am
  3409. Subject: C for the IIGS
  3410.  
  3411.  > Looking for a good C compiler that makes use of the IIGS' features. Any
  3412.  > ideas anyone?
  3413.  >
  3414.  
  3415. Hi,
  3416.  
  3417. one year ago I wrote a book about this rather disappointing machine. Fantastic
  3418. Music chip, nice graphics, nice MAC-like operating system, powerfull processor
  3419. but artificially slowed down by apple to protect it from getting market shares
  3420. of the Ol' Mac (sigh).
  3421. To get a C-Compiler just buy the IIGS-developers-environment. I think it's
  3422. called APW - Apple Programmers Workshop (or something). Within you'll get the
  3423. fabulous Megamax-C-Compiler which is really a slow. So you might get gray hair
  3424. waiting for a complete comiplation. So get your hands on a RAM-expansion and a
  3425. harddisk. Using only disk would quite frustrating. Indeed, the megamax
  3426. C-Compiler is the only C I know for this machine and I could only use the
  3427. soon-to-be-released Gamma-Version (or so).
  3428.  
  3429. Good luck and see you on the bitstream !
  3430.  
  3431. cu Reiner
  3432.  
  3433.  
  3434. --- ConfMail V3.3
  3435.  * Origin: UNIX and C spoken at: (2:507/414.4)
  3436.  
  3437. *** This is a reply to #87.
  3438.  
  3439.  
  3440. From:    Paul Schlyter 
  3441. To:      Heikki Levanto                           Msg #167, 05-Jan-89 10:08am
  3442. Subject: ^Z
  3443.  
  3444.  
  3445.  > Does anyone have a good explanation why MS-DOS has so much fuss with the
  3446.  > eof character, and some other operating systems don't ?   How does Unix
  3447.  > for example know when the file ends. ( it is easy enough if the length is
  3448.  > saved in the directory, but what about files coming from keyboard / modem
  3449.  > ? )
  3450.  
  3451. This is a legacy from CP/M-80, which only allowed file lengths to be an
  3452. even multiple of 128.  In CP/M-80, text files were filled at the end
  3453. with ctrl-Z, up to the next 128-byte boudary (although some programs,
  3454. e.g. Microsoft's, only wrote one ctrl-Z and filled the rest of the remaining
  3455. space with NULs).
  3456.  
  3457. To be upwardly compatible with CP/M-80, MS-DOS also allowed text files to
  3458. be terminated with ctrl-Z. Some early MS-DOS programs (for instance WordStar)
  3459. always the transmission. Printable values (between
  3460. be larger
  3461. than 64KBut since MS-DOS also allowed you to specify an exact file length, this
  3462. was an alternate method of telling where the end of a text file was. No
  3463. ctrl-Z at the end is then necessary.
  3464.  
  3465. s at all (if your program has
  3466. any data, whict choice.
  3467. For profe, some
  3468. programs append no ctrl-Z, some programs append one ctrl-Z, and a few old
  3469. programs append ctrl-Z:s up to the next 128 byte boundary. When reading,
  3470. a well-behaved MS-DOS program should accept both text files that ends
  3471. with a ctrl-Z and those who do not. However, some programs always expects
  3472. a ctrl-Z at the end and behavre, but where will you get it?"
  3473. Kamenz
  3474.  [Klater..
  3475.  
  3476. Jerry
  3477.  
  3478.  
  3479. --- Ms it belongs to the text.
  3480.  
  3481. --- FD TosScan .15
  3482.  * Origin: Paul Schlyter, Stockholm, Sweden (2:501/237.4)
  3483.  
  3484.  
  3485. From:    Paul Schlyter 
  3486. To:      Mats Sjoblom (Sesam Pryo)                Msg #168, 06-Jan-89 08:05am
  3487. Subject: New C'er
  3488.  
  3489.  > You see (pun intended) - all the data structuring possible in Pascal is
  3490.  > readily translatable to C, not so strange since they sprung from a
  3491.  > commonsource - the Algol family.
  3492.  
  3493. Well, C is actually a mixture, also having a lot of heritage from Assembler
  3494. and Fortran. Everybody knows that C is half-way assembler, but most people
  3495. seem to be unaware of the similarities between Fortran and C. So, here's a
  3496. few things that both C and Fortran has, but is missing in Algol and Pascal:
  3497.  
  3498. - Static variables (also local var:s in functions)
  3499. - Variables can be given initial values
  3500. - No type-checking of function arguments (K&R C; possible in ANSI C)
  3501. - Separate compilation as a standard feature of the language
  3502. - Both single and double precision f.p. variables (no complex var:s though)
  3503.     K&R C only has double arithmetics; ANSI C allows float arithmetics too
  3504. - Formatted input and output
  3505. - Equivalence/union (can be simulated with variant records in Pascal)
  3506. - No nested functions
  3507.  
  3508. --- FD TosScan .15
  3509.  * Origin: Paul Schlyter, Stockholm, Sweden (2:501/237.4)
  3510.  
  3511.  
  3512. From:    Paul Schlyter 
  3513. To:      Mats Sjoblom (Sesam Pryo)                Msg #169, 06-Jan-89 07:18am
  3514. Subject: "C"
  3515.  
  3516.  > Ah - word definitions. So - mainframe means "macro computer" does it? I
  3517.  > always used it for mini:s as well - anything not based around a micro
  3518.  > CPU.
  3519.  
  3520. A micro computer can be put on a table; a mini computer can be put in a
  3521. closet; a mainframe computer requires a room.
  3522.  
  3523. --- FD TosScan .15
  3524.  * Origin: Paul Schlyter, Stockholm, Sweden (2:501/237.4)
  3525.  
  3526.  
  3527. From:    Paul Schlyter 
  3528. To:      Heikki Levanto                           Msg #170, 06-Jan-89 07:24am
  3529. Subject: Re: C AND UNIX
  3530.  
  3531.  >  > to send 7 bytes of binary data, if all data bytes have values
  3532.  >  > between 80h and 9Fh.
  3533.  >                    ^^^   FFh
  3534.  
  3535. Nope, that was NOT a mistake.
  3536.  
  3537. If Kermit transmits a data value between 00h and 1Fh, this must be quoted
  3538. as a control char, and then the actual value will be transmitted as a
  3539. printabl char.
  3540.  
  3541. If Kermit transmits a data value between 80h and FFh, this must be quoted
  3542. as a char with the high bit set, and then the actual value will be
  3543. transmitted with the high bit clear.
  3544.  
  3545. If Kermit transmits a data value between 80h and 9Fh, when the high bit is
  3546. cleared, it will become a contrl char. Therefore it must be doubly quoted,
  3547. as a control char with the high bit set.
  3548.  
  3549. Therefore, data values between 80h and 9Fh requires three bytes in the
  3550. transmission.  Data values between 00h and 1Fh, and also between A0h and
  3551. FFh requires only two bytes in the transmission. Printable values (between
  3552. be larger
  3553. than 64K.
  3554.  
  3555. The basic difference is that .COM files can only use one segment (of
  3556. up to 64K), while .EXE files may use any number of segments.  In OS/2
  3557. protected mode, you cannot use .COM files at all (if your program has
  3558. any data, whict choice.
  3559. For professional programming it is becoming a less viable choice.
  3560.  
  3561. Inexpensive compiler, inexpensive library source, the best book on C I've seen
  3562. yet, what more could you ask for?
  3563.  
  3564. Mix Software is in Texas at 1-800-523-9520.
  3565.  
  3566. Just the book and source are worth the cost.
  3567.  
  3568. George "okay... you might want to ask for more, but where will you get it?"
  3569. Kamenz
  3570.  [Klater..
  3571.  
  3572. Jerry
  3573.  
  3574.  
  3575. --- Msg V3.2
  3576.  
  3577. --- ConfMail V3.31
  3578.  * Origin: I'm glad you pointed that out to me.. (1:130/24.814)
  3579.  
  3580. *** This is a reply to #150.
  3581.  
  3582.  
  3583. From:    David Powell 
  3584. To:      All                                      Msg #180, 06-Jan-89 01:38am
  3585. Subject: TURBO C GRAPHICS
  3586.  
  3587. I have Turbo C v.1.0.
  3588. I've read a little about Turbo C v. 2.0 - but haven't learnt much about my
  3589. main interest - the level of support for graphics (for the IBM-PC video modes
  3590. - say, CGA and EGA).  Can someone summarise what they're doing with graphics
  3591. functions?  I'd like to play with music staff notation. 
  3592.  
  3593. ---
  3594.  * Origin: Lodestone: The things you find under WOC's! (Opus 3:711/407)
  3595.  
  3596.  
  3597. From:    Mike Bourne 
  3598. To:      Mike Vore                                Msg #181, 02-Jan-89 09:47pm
  3599. Subject: Re: PROGRAM FILENAMES
  3600.  
  3601.  JG> Micro Cornucopia is a VERY good (and a little 
  3602.  JG> off-the-wall, one of their
  3603.  JG> columnists writes articles concerning the state of the 
  3604.  JG> computing art in TURKEY,
  3605.  JG> of all places) computer magazine.
  3606.  
  3607.  MB> NOW THIS I'm interested in!  Is this a consistent feature or was it 
  3608.  MB> in a particular issue.
  3609.  MB> 
  3610.  MB> (I've been wondering how to justify getting them to 
  3611.  MB> pay for a 
  3612.  MB> subscription to Micro Cornucopia...)
  3613.  
  3614.  MV>    At only $18 a year it is a real bargin, If you can 
  3615.  MV> swing a subscription yourself then YOU can keep the 
  3616.  MV> copy and not have anyone in the office walk off with 
  3617.  MV> it!
  3618.  MV> - mike 
  3619.  
  3620. The problem is that right now I *can't* swing the subscription myself. We
  3621. bought a new house in Oct 87 and still haven't unloaded the old one yet. 
  3622. Sixteen months of two house payments have been tough. The market is not too
  3623. good here in Texas.  We do have a contract, though, and should close in March.
  3624.  
  3625. I took a look at Micro C in the bookstore a couple weeks ago.  I wish that I
  3626. could figure out some way...  Maybe in March.
  3627.  
  3628. Mike Bourne
  3629.  
  3630. --- ConfMail V3.2
  3631.  * Origin: A Point at the Edge of Town (Ft. Worth, TX) (1:124/5208.904)
  3632.  
  3633.  
  3634. From:    Wayne Hamilton 
  3635. To:      Randall Greylock                         Msg #182, 06-Jan-89 12:17pm
  3636. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  3637.  
  3638.  > Earth to moonbase everyone!  I DON'T WANT TO DO THIS AT RUN TIME!
  3639.  > 
  3640. what's the big deal?  this compiles cleanly under TC and runs fine; is it the
  3641. sort of thing you had in mind?  
  3642.   
  3643. struct foo1 {
  3644.     char a;
  3645.     int b;
  3646.     double c;
  3647.     short d;
  3648. };
  3649.  
  3650. struct foo2 {
  3651.     char *var;
  3652.     int off, siz;
  3653. } foo2[] = {
  3654.     /* note: this begs for a macro... */
  3655.     { "a", (int) &(((struct foo1 *) 0)->a), sizeof(((struct foo1 *) 0)->a) },
  3656.     { "b", (int) &(((struct foo1 *) 0)->b), sizeof(((struct foo1 *) 0)->b) },
  3657.     { "c", (int) &(((struct foo1 *) 0)->c), sizeof(((struct foo1 *) 0)->c) },
  3658.     { "d", (int) &(((struct foo1 *) 0)->d), sizeof(((struct foo1 *) 0)->d) }
  3659. };
  3660.  
  3661. main(void)
  3662. {
  3663.     int i;
  3664.  
  3665.     for (i = 0; i < (sizeof(foo2) / sizeof(foo2[0])); ++i)
  3666.         printf("foo1.%s is %d bytes at offset %d\n",
  3667.             foo2[i].var, foo2[i].siz, foo2[i].off);
  3668. }
  3669.  
  3670. output is:
  3671.        foo1.a is 1 bytes at offset 0
  3672.        foo1.b is 2 bytes at offset 1
  3673.        foo1.c is 8 bytes at offset 3
  3674.        foo1.d is 2 bytes at offset 11
  3675.  
  3676. --- ConfMail V3.31
  3677.  * Origin: The Programmer's Toolbox HST (1:232/400)
  3678.  
  3679. *** Part of a conversation.
  3680.  
  3681.  
  3682. From:    Wayne Hamilton 
  3683. To:      Kirby Angell                             Msg #183, 06-Jan-89 12:04pm
  3684. Subject: Re: reading the 'command line'
  3685.  
  3686.  > The first argument (in argv[]) is the name of the program only in DOS 
  3687.  > versions  3.3 and above.  In previous versions (depending on the compiler 
  3688.  > but generally)  argv[0] == NULL.
  3689.  > 
  3690. that should be 3.0 and above. 
  3691.                  ^
  3692.  
  3693.  
  3694. --- ConfMail V3.31
  3695.  * Origin: The Programmer's Toolbox HST (1:232/400)
  3696.  
  3697. *** Part of a conversation.
  3698.  
  3699.  
  3700. From:    Jimmie Mcdonald 
  3701. To:      Larry Marshall                           Msg #184, 06-Jan-89 06:51pm
  3702. Subject: ANSI conformance of MSC
  3703.  
  3704. To be ANSI conformant, a compiler MUST correctly compile ANY
  3705. ANSI conformant program, including the following one:
  3706.  
  3707.  
  3708. void far(
  3709. {
  3710.   return 1;
  3711. }
  3712. main()
  3713. {
  3714.   (void) far();
  3715. }
  3716.                                                      . I
  3717. which Microsoft C 5.1 will not do in its default mode, It will do
  3718.  
  3719.  
  3720. it only if you give it the /Za switch.
  3721. The point is that compilers to be conformant MUST NOT usurp ANY
  3722. POSSIBLE user defined variable or function name. Names beginning
  3723. with an underscore are NOT ALLOWED to be used by conforming programs,
  3724. but MAY be used by additions to a vendor's library. I am not
  3725. sure whether or not vendors are allowed to add KEYWORDS beginning
  3726. with an underscore.
  3727.  
  3728. Doug McDonald
  3729.  
  3730. --- ConfMail V3.31
  3731.  * Origin: StageDoor -- U.S. Inst. for Theatre Technology (1:233/3)
  3732.  
  3733.  
  3734. From:    Larry Marshall 
  3735. To:      Bob Stout                                Msg #185, 04-Jan-89 06:51pm
  3736. Subject: Re: PRODUCTIVITY
  3737.  
  3738.  .>  I just DL'ed Qedit 2.07. I still like EC's column blocks better, but
  3739.  .>Sammy's obviously been doing his homework. BTW, I talked to the author
  3740.  .>of EC the other day and the next version will include a directory
  3741.  .>picker, EGA/VGA support, and virtual memory ("virtual is its own
  3742.  .>reward!" :-)
  3743.  .>
  3744.  . Here's one to show my ignorance (again).  What is to like or
  3745. dislike about column blocks???  IT would seem that you either can
  3746. block columns or you can't.  What's the difference? --- Larry
  3747. --- TBBS v2.0
  3748.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  3749.  
  3750. *** Part of a conversation.
  3751.  
  3752.  
  3753. From:    Larry Marshall 
  3754. To:      Dan Norstedt                             Msg #186, 04-Jan-89 06:52pm
  3755. Subject: Re: DEBUGGER.
  3756.  
  3757.  .> > hide) any symtoms (sp?) while the search progresses. Further, most
  3758.  .> > bugs can be traced back to their cause without a debugger.
  3759.  .>
  3760.  .>I would state that their is NO professional programming project today
  3761.  .>that doesn't use a debugger, if one is available. Period.
  3762.  .>
  3763.  . Thanks for your deeeeep insight.  You must look over the shoulders
  3764. of a lot of people.  Do you really think your statement should be
  3765. taken as fact???? --- Larry "just the facts please" Marshall
  3766. --- TBBS v2.0
  3767.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  3768.  
  3769. *** Part of a conversation.
  3770.  
  3771.  
  3772. From:    Larry Marshall 
  3773. To:      Bob Stout                                Msg #187, 04-Jan-89 06:52pm
  3774. Subject: Re: HELLO.
  3775.  
  3776.  .>DG> Briefly, how is C different from Pascal, to the best of your
  3777.  .>DG> knowledge (11 lines or less please)
  3778.  .>
  3779.  .>Terser++.
  3780.  .>
  3781.  . Got my debugger going Bob.  Shouldn't that be ->  Terser++;
  3782.  . ---{grin()}---Larry "thanks for the present"
  3783. --- TBBS v2.0
  3784.  * Origin:  -*>> [SQUARE-HEADs] HST Multi-Line BBS <<*- QuebecCity  (240/1)
  3785.  
  3786. *** Part of a conversation.
  3787.  
  3788.  
  3789. From:    Roy Tellason 
  3790. To:      Jon Guthrie                              Msg #188, 06-Jan-89 04:29pm
  3791. Subject: Re: Linefeed in TurboC
  3792.  
  3793.  
  3794.  BS> 1.  Open the output stream in binary mode. 
  3795.  BS> 2.  Use '\012' (octal) or '\x0a' (hex) to explicitly enter 
  3796.  BS> the character.  
  3797.  
  3798.  > If the run-time library converts all the LineFeed characters 
  3799.  > (people keep referring to them as 'Newline' characters, but 
  3800.  > none of my ASCII tables has any character named NewLine in 
  3801.  > them) to CR/LF pairs, then your bit of subterfuge will not 
  3802.  > work, either. 
  3803.   
  3804.  Yeah, but that's the point of opening in binary mode,  in which such 
  3805.  conversions should not take place.  "Newline" is not defined in terms 
  3806.  of a specific ascii character,  either.  It's actual machine 
  3807.  representation will vary from one system to another. 
  3808.   
  3809.  
  3810. --- Opus-CBCS 1.10.0f
  3811.  * Origin: The Other BBS (1:150/501.0)
  3812.  
  3813. *** This is a reply to #159.
  3814.  
  3815.  
  3816. From:    Bill Leary 
  3817. To:      Bob Stout                                Msg #189, 05-Jan-89 05:20pm
  3818. Subject: Re: WINDCHILL
  3819.  
  3820. How about, to stay in line with the purpose of this conference, I put the
  3821. program the implements the thing in here. Or is that not the purpose of the
  3822. conference? Moderator : HELP !
  3823. --- TBBS v2.1
  3824.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  3825.  
  3826. *** This is a reply to #152.
  3827.  
  3828.  
  3829. From:    Bill Leary 
  3830. To:      Randall Greylock                         Msg #190, 05-Jan-89 05:27pm
  3831. Subject: Re: COMPUTING ADDRESS OFFSETS WIT
  3832.  
  3833. Sorry. I thought you WANTED it computed at RUNTIME rather than COMPILE time.
  3834. I've no idea how to solve it for compile time.
  3835. --- TBBS v2.1
  3836.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  3837.  
  3838.  
  3839. From:    Bill Leary 
  3840. To:      Dan Norstedt                             Msg #191, 05-Jan-89 10:46pm
  3841. Subject: REPLY TO DEBUGGER MESSAGE
  3842.  
  3843.  DN> I would state that there is NO professional programming project
  3844.  DN> today that doesn't use a debugger, if one is available. Period.
  3845.  
  3846.  Well, I've been working on a project for about 5 years now. Imbedded
  3847. software project with from 8 to 20 professional programmers working on it over
  3848. the years. Two of the processors in each product use the Regulus (a UNIX
  3849. similar) operating system, the other four to 36 processors run MTOS (a
  3850. real-time multi-tasker). A debugger's been available for the Regulus system
  3851. since day one, but has been used by only one person, perhaps 20 times over the
  3852. whole history of the project. The MTOS machines don't have a debugger
  3853. available, but the Regulus ones do. The rest of us have still never used the
  3854. debugger. This is with the source code pushing 4 megabytes right now. The guy
  3855. that USES the debugger seems to get along with it, but to the rest of us it
  3856. was just too much trouble.
  3857. --- TBBS v2.1
  3858.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  3859.  
  3860.  
  3861. From:    Doug Asherman 
  3862. To:      Joubert Berger                           Msg #192, 07-Jan-89 10:52am
  3863. Subject: Re: declaring variables
  3864.  
  3865.  > I have a question.  Is it possible to declare a variable
  3866.  > at an absolute address  -- in Modula2 you can say "screen[b800h]"
  3867.  > to have the variable
  3868.  > screen located at b800.  Can this be done in C?
  3869.  
  3870. Yup.  I believe the syntax is:
  3871.  
  3872.         const char far *screen = 0xb800;
  3873.  
  3874. The syntax for doing this is kind of confusing, and your best bet for
  3875. answering questions like this is "C: A Reference Manual" by Harbison and
  3876. Steele. 
  3877.  
  3878. ---
  3879.  * Origin: Gurgi 415-845-6157, Berkeley, CA USA (Opus 1:161/41)
  3880.  
  3881. *** This is a reply to #153.
  3882.  
  3883.  
  3884. From:    Martin Pollard 
  3885. To:      Gary Lau                                 Msg #193, 07-Jan-89 02:01am
  3886. Subject: Re: Mix Power C
  3887.  
  3888. Gary, yours was the first message that didn't beat me about the head for my
  3889. little "commentary" at the end of my message (which, I admit, didn't belong in
  3890. this particular message and hope you didn't take the wrong way).  So, yours is
  3891. 1.20?  Perhaps they fixed the problem with compiling in the small and large
  3892. models, then.  I based my claim on two factors: (1) Compiling with the /ms and
  3893. /ml options didn't make any difference in the size of the code [although I
  3894. don't have the experience with different "models" of C programs, so I couldn't
  3895. really say if this is an indication], and (2) a review of Power C in PC
  3896. MAGAZINE's recent "C issue" stated that small/large compiling wouldn't work
  3897. with the version they tested (which just happened to be 1.16).  Perhaps I
  3898. should write Mix and ask about their upgrade policy?  It seems strange that
  3899. their software doesn't come with any sort of registration card (I wonder if
  3900. their older software did?).  Perhaps they keep the name and address of the
  3901. person who ordered the product in a database; who knows?
  3902.  
  3903. Thank you very much for your reply; it helped quite a bit.  (Now, to see if I
  3904. can upgrade to 1.20...)
  3905.  
  3906. ==> Martin <==
  3907.  
  3908.  
  3909.  
  3910. ---
  3911.  * Origin: Flight of the Phoenix 300/1200/2400 MNP/5  (120/80) (Opus 1:120/80)
  3912.  
  3913. *** Part of a conversation.
  3914.  
  3915.  
  3916. From:    Jon Guthrie 
  3917. To:      Braden Claxton                           Msg #194, 06-Jan-89 10:16am
  3918. Subject: Re: Non-ANSI C
  3919.  
  3920.  BC> What does the acronym AWK mean? I have never seen that one before.
  3921.  BC>                 Braden
  3922.  
  3923. AWK is a string processing language created by Aho, Weinberg, and
  3924. Kernighan.  (HINT:  Look at the authors' initials.)
  3925.  
  3926. --- Via OpXpress V1.06ß "Silver"  SCIGUY -  The Scourge of Delphi!
  3927.  * Origin: FOG-LINE;FOG#51;USR HST;515-964-7937 (1:14/627)
  3928.  
  3929. *** Part of a conversation.
  3930.  
  3931.  
  3932. From:    Jon Guthrie 
  3933. To:      Mike Housky                              Msg #195, 06-Jan-89 10:07am
  3934. Subject: Re: Ctl-C/Break
  3935.  
  3936.  MH> > ... Anyway, how would you turn the control break off?
  3937.  MH> .
  3938.  MH> Well ... normally I wouldn't. I might intercept it with 
  3939.  MH> signal(SIGINT,xxx) if the compiler supported it (as does MSC, 
  3940.  MH> TC2.0,  Power C, etc.) This does not prevent a "^C" from being 
  3941.  MH> echoed to the  console by DOS, but Ctrl-Break is not likely an 
  3942.  MH> accidental keystroke and  a well-designed program will generally 
  3943.  MH> honor a request to terminate  gracefully.
  3944.  
  3945. Yes, but the working wording is 'gracefully.'  If you're in the middle
  3946. of somthing that cannot be disturbed, then you need to trap it, and
  3947. handle it later.
  3948.  
  3949.  MH> P.S. I heard some time ago about some presumably legal method for 
  3950.  MH> avoiding the ^C echo, using something called "raw" I/O under DOS. 
  3951.  MH> In the  intervening two years (maybe less) I haven't had call to 
  3952.  MH> find out more  about this (like I said, it's not often that you 
  3953.  MH> need to worry about that  little ^C.) Maybe someone else will pipe 
  3954.  MH> up about it. 
  3955.  
  3956. I know how to use raw I/O to and from the console and left the code here
  3957. some time back.  It was in response to a different problem, so I don't
  3958. know if it doesn't echo the '^C' but it definitely works.  (As long as
  3959. you don't mind avoiding "getc()'s" and such...Turbo C's library hangs
  3960. the machine when you try to use anything but fread() during raw input.)
  3961.  
  3962. Could post the code to get in and out of raw mode again, I guess.
  3963.  
  3964. --- Via OpXpress V1.06ß "Silver"  SCIGUY -  The Scourge of Delphi!
  3965.  * Origin: FOG-LINE;FOG#51;USR HST;515-964-7937 (1:14/627)
  3966.  
  3967. *** Part of a conversation.
  3968.  
  3969.  
  3970. From:    Jon Guthrie 
  3971. To:      Roy Browning                             Msg #196, 06-Jan-89 10:14am
  3972. Subject: Re: Non-ANSI C
  3973.  
  3974.  RB>        As a K&R 'C'eer I can tell that that won't fly.  The ANSI 
  3975.  RB> compilers can   handle the old method of function declaration but 
  3976.  RB> the K&R compilers can't   handle the prototypes!!!  Every 
  3977.  RB> functions will have to be hand modified or or   both versions 
  3978.  RB> incorporated with #defines.  Example: 
  3979.  RB> #ifdef ANSI
  3980.  RB> int doit(int cnt, char *str){}
  3981.  RB> #else
  3982.  RB>  /* K&R */
  3983.  RB> int doit(cnt, *str)
  3984.  RB> int cnt;
  3985.  RB> char *str;
  3986.  RB> {}
  3987.  RB> #endif
  3988.  
  3989. Actually that should be
  3990.  
  3991. #ifdef ANSI
  3992. int doit(int cnt, char *str);  /* NOTE the semicolon.  That's what */
  3993.                                /* makes it a prototype */
  3994. #else
  3995. int doit();                    /* just the return type is specified */
  3996. #endif
  3997.  
  3998. Then, later on, you would have the actual function defintions.  These
  3999. are just function declarations.
  4000.  
  4001. --- Via OpXpress V1.06ß "Silver"  SCIGUY -  The Scourge of Delphi!
  4002.  * Origin: FOG-LINE;FOG#51;USR HST;515-964-7937 (1:14/627)
  4003.  
  4004. *** This is a reply to #194.
  4005.  
  4006.  
  4007. From:    Jon Guthrie 
  4008. To:      Henry Piper                              Msg #197, 06-Jan-89 10:17am
  4009. Subject: Re: Pascal to C
  4010.  
  4011.  HP> You do have it right! The advantage of .COM programs are that they 
  4012.  HP> are  faster to load than .EXE, but are limited to 
  4013.  HP> 64k.(Supposedly). .EXE  programs can be much larger, but are 
  4014.  HP> somewhat slower to load. 
  4015.  
  4016. Another advantage (or disadvantage, depending on the situation) is that
  4017. .COM files have access to ALL of memory, while .EXE files are only
  4018. allocated what they said they needed.
  4019.  
  4020. --- Via OpXpress V1.06ß "Silver"  SCIGUY -  The Scourge of Delphi!
  4021.  * Origin: FOG-LINE;FOG#51;USR HST;515-964-7937 (1:14/627)
  4022.  
  4023. *** Part of a conversation.
  4024.  
  4025.  
  4026. From:    Martin Maney 
  4027. To:      Randall Greylock                         Msg #198, 06-Jan-89 03:42pm
  4028. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  4029.  
  4030.  RG> What I want to do is something like thives to the advertising industry!  
  4031.  
  4032.     bject: Re:>   [computed offset to C in _MyStruct goes here]
  4033.  RG>   };
  4034.  RG> 
  4035.  RG> I.E., I want to do it STATICALLY!  At COMPILE TIME.  Not run time.
  4036.  
  4037.   _MyOffset = {
  4038.     "Variable C",
  4039.     offsetof(_MyStruct, C)
  4040.     };
  4041.  
  4042. Should do the trick.  Of course, you're limited (almost certainly) to offsets
  4043. into structures defined "above" the place the initializer is, but that's not a
  4044. problem.
  4045.  
  4046. /\/\artin
  4047.  
  4048.  
  4049.  
  4050. --- msged 1.94S ZTC
  4051.  * Origin: Mind is Moving [Palatine, IL]  (1:115/790.3)
  4052.  
  4053. *** Part of a conversation.
  4054.  
  4055.  
  4056. From:    Alex Wyss 
  4057. To:      Adam Beauregard                          Msg #199, 04-Jan-89 08:44pm
  4058. Subject: Stop: HAYES OR HAYES COMPATIBLE MODEMS
  4059.  
  4060.  A: Does anyone out there have a 1200 or higher baud modem they want to 
  4061.  A: sell. It must be an external, and have a decent price on it.  It will be 
  4062.  A: greatly appreciated if you have one to sell.  Thank-you.
  4063.  
  4064.        To ALL,
  4065.  
  4066.        Please, please stop non-topic messages, this area is already flooded by
  4067. correct messages! There is a fast growing sysop group in this region who wants
  4068. to drop this huge conference! I certainly have a lot of modems to sell, but I
  4069. definitively do not believe it to be useful, to send it over the sea, do you?
  4070.        CU, Alex
  4071.  
  4072.  
  4073. --- msged 1.943S ZTC
  4074.  * Origin: OS-9/68K Gepard Box Zuerich <EFFO/IVSS/sf..>  (fidonet 2:302/801)
  4075.  
  4076.  
  4077. From:    Gottfried Ganssauge 
  4078. To:      Paul Edwards                             Msg #200, 05-Jan-89 03:18pm
  4079. Subject: Blue murder
  4080.  
  4081. Hi paul,
  4082. thanks for the welcome.
  4083.  
  4084.  > I think maybe you read the wrong bit of documentation?
  4085.  > I think a lot of people in this echo would have been screaming blue murder
  4086.  > if Borland stuffed that up.
  4087. They definitely did it :>( (TURBO C Reference Guide, 1st edition, page 122),
  4088. but I didn't hear anything like "blue murder" <grin>
  4089.  
  4090.  > Maybe they mistranslated when converting the manuals to Swedish or
  4091.  > whatever?
  4092. German :-), but I read the english version.
  4093.  
  4094.  > It's good to see some Zone 2 messages coming in.
  4095.  > It's a shame your origin line doesn't say what country it's coming from.
  4096. Hope this is corrected by now
  4097.                 Ciao, Gottfried
  4098.  
  4099. --- ConfMail V4.00
  4100.  * Origin: Gotti's AT (Berlin/W-Germany) (2:245/1000.35)
  4101.  
  4102.  
  4103. From:    Ron Dwight 
  4104. To:      Martin Pollard                           Msg #201, 05-Jan-89 09:00am
  4105. Subject: Re: Mix Power C
  4106.  
  4107.  > 1)  My version of th1/1004 (Opus 1:26102/4)
  4108.  
  4109.  
  4110. From:
  4111. ---
  4112.  * Origin: III Corps atest version of the compiler is 1.2, but IF you upgrade and
  4113. you use Power C trace, be sure to upgrade that as well.  The compiler emits 32
  4114. character variables for trace and the old trace only handles 8.   This is not
  4115. too bad but you will have to give the option "/t8" every time you compile for
  4116. trace.  
  4117.  
  4118.  > 2)  Has anyone been able to compile using the small and 
  4119.  > large memory
  4120.  
  4121.           Never tried.  
  4122.  
  4123.  > 3)  How do you feel about Power C?  Likes?  Dislikes?
  4124.  
  4125.           FANTASTIC value for money, good tutorial.  Trace is wonderful, easy
  4126. to use.  Problems are compatibility, but they are working on it.  
  4127.  
  4128.           I agree with your comments and it is really VERY sad to see the
  4129. condition into which we (the consumers) have been placed.  We are told, and
  4130. believe, that if it's cheap it cannot be any good.  Think about that for a few
  4131. moments.  Is it REALLY true that cheap=NBG?  Do you REALLY believe cheap=NBG? 
  4132. If so WHY?  Let's try not to be slaves to the advertising industry!  
  4133.  
  4134.     bject: Re: VAXen
  4135.  
  4136. ->   Actually, you can stop calling VAXen (the plural form of
  4137. -> VAX) super-minis after the VAX 11/780.  Anything more
  4138. -> powerful than that COULD be considered to be a mainframe...
  4139. ->  VAX 8800 is a BIG machine.
  4140.  
  4141. I guess you have your point there.  I wonder what the definition of
  4142. mainframe is.
  4143. --- QuickBBS v2.03
  4144.  * Origin: The Isle Of Lucy (1:106/797)
  4145.  
  4146. *** This is a reply to #66.
  4147.  
  4148.  
  4149. From:    Patrick Wu 
  4150. To:      Mike Housky                              Msg #207, 07-Jan-88 09:36am
  4151. Subject: Re: Ctl-C/Break
  4152.  
  4153. ->  Well ... normally I wouldn't. I might intercept it with
  4154. -> signal(SIGINT,xxx) if the compiler supported it (as does
  4155. -> MSC, TC2.0, Power C, etc.) This does not prevent a "^C"
  4156.  
  4157. Thanks for the information, I may give it a try later.
  4158. --- QuickBBS v2.03
  4159.  * Origin: The Isle Of Lucy (1:106/797)
  4160.  
  4161. *** Part of a conversation.
  4162.  
  4163.  
  4164. From:    Patrick Wu 
  4165. To:      Larry Marshall                           Msg #208, 07-Jan-88 09:40am
  4166. Subject: Re: DEBUGGER.
  4167.  
  4168. ->  . Boy, if you talk to your "straight forward" computer the
  4169. -> talk here I wonder what results you get.  I thought
  4170. -> known for their concern for syntax and proper language use,
  4171. -> what the language.  I just applied for a job at the
  4172. -> University of
  4173. -> Houston; does everybody write like that?  I wouldn't have
  4174.  
  4175. This is a sign of your ignorance, and I will bet you one hundred dollar if
  4176. you can write Japanese or Chinese as good as my English.  I would be
  4177. surprised if the University of Houston hires you, then again, they would
  4178. hire
  4179. anybody.
  4180. --- QuickBBS v2.03
  4181.  * Origin: The Isle Of Lucy (1:106/797)
  4182.  
  4183. *** This is a reply to #186.
  4184.  
  4185.  
  4186. From:    Roland Brown 
  4187. To:      Kevin Wang                               Msg #209, 07-Jan-89 10:48am
  4188. Subject: Re: re: Turbo vs. 2.0
  4189.  
  4190.  >
  4191.  > Let me ask this further question:  Do you remember absolutely
  4192.  > all the commands, and never have to look them up in the
  4193.  > reference book?  Well, Quick C has a neat function in it...put
  4194.  > your cursor over a particular function, press Shift-F1,
  4195.  > and you will get a syntax/usage of that particular function.
  4196.  
  4197. So does Turbo C (Crtl F1) and if you have the TASM module you get a stand
  4198. alone TSR called THELP that you can use with Turbo C or Pascal or, I believe,
  4199. roll your own helps for whatever.
  4200.  
  4201. roland 
  4202.  
  4203. ---
  4204.  * Origin: Sky Pilot Point Mail Box Off 261/1004 (Opus 1:26102/4)
  4205.  
  4206.  
  4207. From:
  4208. ---
  4209.  * Origin: III Corps Bulletin Board System - Garrison Version (Opus 1:382/63)
  4210.  
  4211.  
  4212. From:    Zero Eagle 
  4213. To:      Mike Housky                              Msg #212, 06-Jan-89 11:52am
  4214. Subject: Re: Ctl-C/Break
  4215.  
  4216.  " P.S. I heard some time ago about some presumably legal method for 
  4217.  " avoiding the ^C echo, using something called "raw" I/O under DOS.
  4218.  " In the  intervening two years (maybe less) I haven't had call to
  4219.  " find out more  about this (like I said, it's not often that you
  4220.  " need to worry about that  
  4221.  " little ^C.) Maybe someone else will pipe up about it.
  4222.  
  4223. I'd be genuinely interested in that.  But here's a question for you;
  4224. What exactly causes the "^C"?  It it displayed through the keyboard
  4225. harware@5╣╤ò╔╔╒┴╤²jñh┤╡
  4226. ñCà--- Ned 1.01
  4227.  
  4228. --- ConfMail V4.00
  4229.  * Origin: _*~ The Fowl Weather Post ~*_  &Fowl_Weather_Post=148314;  /* Opus
  4230. */ (1:148/314)
  4231.  
  4232. *** This is a reply to #210.
  4233.  
  4234.  
  4235. From:    George Stanislav 
  4236. To:      Jon Guthrie                              Msg #213, 06-Jan-89 03:28pm
  4237. Subject: Re: Learning C
  4238.  
  4239.  >  GS> A problem located deep in the library can be discovered
  4240. ....
  4241.  >
  4242.  > Two things.  One, how come everybody but me finds errors
  4243.  > deep in the
  4244.  > standard library?
  4245.  
  4246. I did not say it was the STANDARD library, Jon. However, it was in the library
  4247. specifically written for the project. There was a minor typo in it which
  4248. happened to paralyze the whole system.
  4249.  
  4250.  > I did not say that I would NEVER use the debugger.  Fact
  4251.  > is, I already
  4252.  > HAVE.  I AM saying that I do not expect to need it much.
  4253.  
  4254. I did not say that you said anything. I simply stated that a debugger can be
  4255. an invaluable tool. I was reacting to the statement (whether yours or someone
  4256. else's, I do not remember) that debuggers are used by lazy people.
  4257.  
  4258. Debuggers are extremely important. It is sometimes impossible to see your own
  4259. logical mistake unless you go through the program step by step. Or at least
  4260. through the section of the program where the problem occurs.
  4261.  
  4262.                                         -George-
  4263.  
  4264.  
  4265.  
  4266. --- Opus-CBCS 1.10.v.x
  4267.  * Origin: Astral Board * OPUS Rising * (1:129/39.1)
  4268.  
  4269. *** Part of a conversation.
  4270.  
  4271.  
  4272. From:    Michael Schwartz 
  4273. To:      Roy Tellason                             Msg #214, 06-Jan-89 04:58pm
  4274. Subject: Programming in C
  4275.  
  4276. Hi Roy,
  4277.  
  4278. Thanks for responding to my message.  I'm glad your fond of "Programming Using
  4279. the C Language."  I will check out "Software Tools" and "Reliable Data
  4280. Structures in C", and "Variations in C" as well.
  4281.  
  4282.  
  4283. --- Opus-CBCS 1.10.v.x
  4284.  * Origin: Astral Board * OPUS Rising * (1:129/39.0)
  4285.  
  4286. *** There is a reply. See #249.
  4287.  
  4288.  
  4289. From:    Andy Wendel 
  4290. To:      Kevin Wang                               Msg #215, 07-Jan-89 03:01am
  4291. Subject: re: Turbo vs. 2.0
  4292.  
  4293. Same nifty help is in TC2.0 as well. Although I am now seriously thinking
  4294. about Zortech X C++ (Micro C says too many good things about it to let it slip
  4295. by, and it is cheaper than the $105 base for TC2, which I already have).
  4296.  
  4297. Andy
  4298.  
  4299.  
  4300. --- msged 1.943S ZTC
  4301.  * Origin: Guild House AT - 16Mhz Power (bleah 1:109/741)
  4302.  
  4303. *** This is a reply to #147.
  4304.  
  4305.  
  4306. From:    Randall Greylock 
  4307. To:      Bob Stout                                Msg #216, 06-Jan-89 12:03pm
  4308. Subject: Re: Walter and Micro C
  4309.  
  4310. So by putting nearly everything in it's own .obj, I'm really screwing things
  4311. up if I understand what you are saying ...
  4312.  
  4313. --- ConfMail V4.00
  4314.  * Origin: Greylock (1:321/202.4)
  4315.  
  4316. *** Part of a conversation.
  4317.  
  4318.  
  4319. From:    Daniel Lyke 
  4320. To:      Ron Dexter                               Msg #217, 05-Jan-89 09:02am
  4321. Subject: Re: Pascal to C
  4322.  
  4323.  > Why??
  4324.  > Why did Borland go to EXE files, are they really any 
  4325.  > better?
  4326.  > Tell me if I'm right;  EXE files are prefered because 
  4327.  > you can
  4328.  > continue to add or link to them???; and COM files are 
  4329.  > good because
  4330.  > they "can be" small and faster???
  4331.  
  4332. This isn't really C, but it could be useful to many of us.
  4333.  
  4334. Under MS/PC-DOS, the .COM files are those that are direct memory images. The
  4335. .EXE files have some relocation and quasi-compression (unassigned variables
  4336. aren't part of the memory image), and are easier to make work across multiple
  4337. code and data segments.
  4338.  
  4339. To handle segments larger than 64k, a .COM file would have to do relative
  4340. manipulation of the segment 
  4341. To:      Charlie explicitly ode segment, although calls could probably be done with PUSHes and RETs.
  4342. A .EXE file puts the appropriate labels and loader information in, and when
  4343. the loader finds a lo40;36mTo:      All                    happen. Can any  of you help me? ate to the current load position.
  4344.  
  4345. Under OS/2 and Windows you can add or link dynamically, including the
  4346. appropriate code for the situation or sharing code between applications, but
  4347. MS-DOS was written when memory was expensive and IBM didn't know systems
  4348. design.
  4349.  
  4350. Memory's cheap, but IBM hasn't changed.
  4351.  
  4352. Dan
  4353.  
  4354. eading in characters,
  4355. the array is filled tong characters,
  4356. but ms which
  4357. use similar nomenclature, such as VMS)
  4358.  
  4359. --- Sirius 0.50
  4360.  
  4361.  
  4362.  
  4363.  
  4364. --- BINKscan v0.4
  4365.  * Origin: POINTless Wondering (Opus 1:362/101.2)
  4366.  
  4367. *** This is a reply to #197.
  4368.  
  4369.  
  4370. From:    Daniel Lyke 
  4371. To:      Paul Edwards                             Msg #218, 05-Jan-89 09:23am
  4372. Subject: Re: sin() in calculator
  4373.  
  4374.  > 1) Is it ok to call a function with 2 parameters, when 
  4375.  > it only expects
  4376.  >    to receive 1?
  4377.  
  4378. Yes. But you may not receive the answer that you expect.
  4379.  
  4380. As for the rest of the question, I'm not sure that I totally understand it,
  4381. but I'd probably build an array of structures, like you suggest, and include a
  4382. little more information, such as what and how many the parameters are supposed
  4383. to be. Then, when you hit the function, you could evaluate 'til you hit a
  4384. comma or a closing paren. Check for the appropriate errors (mismatched
  4385. parens), and this'll tell you whether you have the appropriate number of
  4386. arguments.
  4387.  
  4388. I suggest that you build your evaluate() function so that it can be called
  4389. recursively. Expression evaluation is a little easier with recursion.
  4390.  
  4391. Any help, or am I totally of the mark?
  4392.  
  4393. Dan
  4394.  
  4395. --- Sirius 0.50
  4396.  
  4397.  
  4398.  
  4399.  
  4400. --- BINKscan v0.4
  4401.  * Origin: POINTless Wondering (Opus 1:362/101.2)
  4402.  
  4403. *** Part of a conversation.
  4404.  
  4405.  
  4406. From:    Jerry Pevahouse 
  4407. To:      Theeast Isred                            Msg #219, 05-Jan-89 08:23pm
  4408. Subject: Re: Learning C
  4409.  
  4410. ALL real C compilers are case sensitive. That should always be
  4411. considered when choosing varibles. Whether the linker is case
  4412. sensitive or not I would advise avoiding similar names for varibles
  4413. and using global varibles very sparsely. Ideally in C varibles
  4414. should be local and passed as parameters to avoid conflicts. Thats
  4415. one of the reasons Kernigan and Richie chose the function/block code
  4416. approach and C is such a stack intensive language. Ideally there
  4417. could be 50 variables named "myvar" declared locally, as long as
  4418. there isn't a global "myvar" varible or more than one local "myvar".
  4419.  
  4420. --- EMM 2.00r Support SHAREWARE register your programs!
  4421.  * Origin: The Switch Room Plainsboro NJ 799-9374 (9:807/11)
  4422.  
  4423. *** Part of a conversation.
  4424.  
  4425.  
  4426. From:    Jerry Pevahouse 
  4427. To:      Bill Leary                               Msg #220, 05-Jan-89 08:41pm
  4428. Subject: Re: READING THE 'COMMAND LINE'
  4429.  
  4430. main(argc,argv)
  4431.  int  argc;
  4432.  char *argv[];
  4433. this always works on my compiler and is more Kernigan/Richie I
  4434. believe.
  4435. The typing/declaration within the brackets is more Turbo C-like to me
  4436. and I think is more compiler specific.
  4437.  
  4438. --- EMM 2.00r Support SHAREWARE register your programs!
  4439.  * Origin: The Switch Room Plainsboro NJ 799-9374 (9:807/11)
  4440.  
  4441. *** This is a reply to #183.
  4442.  
  4443.  
  4444. From:    Jerry Pevahouse 
  4445. To:      Charlie explicitly relied on it being 0 a few times.
  4446.  
  4447.  
  4448. ---
  4449.  * Origin: BIKENET, Missoula MT (406) 549-1318 (Opus 1:346/5)
  4450.  
  4451.  
  4452. From:    Dick Copits 
  4453. To:      All                    happen. Can any  of you help me? What I tried was:
  4454.  
  4455. name[26];
  4456.  
  4457. x=0;
  4458. while(x<25 && char[x]!='\n')
  4459. {
  4460. name[x]=getchar();
  4461. x++
  4462. }
  4463.  
  4464. and I even tried a display from within the loop and before the x++ is done.
  4465. What seems to happen is that the display that I put in the loop is never done
  4466. until the loop is exited. If I press enter while I'm reading in characters,
  4467. the array is filled tong characters,
  4468. but if I press enter, there are only enough characters to fill the array. Can
  4469. anyone give me the correct and TESTED code to accept characters into the
  4470. variable "name" and terminate either on the pressing of the enter key or the
  4471. entering of the 26 characters? Thank you very much.
  4472. Dick Copits, Sysop, 322/591, 508-366-5685.
  4473.  
  4474. --- ConfMail V4.00
  4475.  * Origin: (c)1988 Rogers & Blake (508)373-2204 (1:324/120)
  4476.  
  4477.  
  4478. From:    Bill Leary 
  4479. To:      Larry Marshall                           Msg #226, 07-Jan-89 09:38pm
  4480. Subject: Re: SUBST, ADS
  4481.  
  4482. I think that the companys never sending me anything at all (except MicroPro,
  4483. bless there hard-up-for-money hearts) bothers me most because the things I
  4484. really want to hear about are "for a limited time only, upgrade to rev 8.9.1
  4485. for just $90.00, after such-and-such a date, $500.00!".  I missed the
  4486. window-of-opportunity on my C compiler (Manx Aztec), Turbo Pascal (twice!),
  4487. PC-Paintbrush, and Microsoft Windows. Although the last DID allow me to
  4488. upgrade, when I pointed out that they'd never told me anything, even though I
  4489. was registered.
  4490. --- TBBS v2.1
  4491.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  4492.  
  4493. *** This is a reply to #122.
  4494.  
  4495.  
  4496. From:    Bill Leary 
  4497. To:      Bob Stout                                Msg #227, 07-Jan-89 09:44pm
  4498. Subject: Re: PRODUCTIVITY
  4499.  
  4500. While I DO in fact compile smaller programs to .COM insted of .EXE (my
  4501. compiler's loader has an option), the only noticible difference I usually get
  4502. is about a half K smaller. Since I'm using a reasonably fast disk, on a 10MHz
  4503. AT clone, the load time differences aren't noticible. The half K smaller is,
  4504. of course, the .EXE program prefix block (I forget what it's REALLY called).
  4505. At my usual 2400K baud a halfK, amounts to about 2 seconds.
  4506. --- TBBS v2.1
  4507.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  4508.  
  4509. *** This is a reply to #185.
  4510.  
  4511.  
  4512. From:    Bill Leary 
  4513. To:      Rubens Abboud                            Msg #228, 07-Jan-89 09:50pm
  4514. Subject: Re: TC2.0 - FEOF() BU
  4515.  
  4516. I know what you mean. I use the phrase "Please do babble on" with people at
  4517. work once in a while, but in that case my facial expressions, and the fact
  4518. that they know me, makes a world of difference.
  4519.  
  4520. Anyhow, I've wasted enough space on this conference on this subject and, as
  4521. you say, it was settled via netmail anyhow.
  4522. --- TBBS v2.1
  4523.  * Origin: Cul-De-Sac Bar & Grill  *SeaDog 4.5 & HST*  508-429-8857  (322/360)
  4524.  
  4525. *** This is a reply to #108.
  4526.  
  4527.  
  4528. From:    Casey Mccabe 
  4529. To:      All                                      Msg #229, 08-Jan-89 01:32am
  4530. Subject: Power C
  4531.  
  4532.  Hello, everybody. I am inquiring about Power C.
  4533.  
  4534.  - What type(s) of advantages, disadvantages does it
  4535.    have over other C compilers?
  4536.  
  4537.  - What are some speed benchmarks for it in comparison to
  4538.    other C compilers(compiling, linking, compiled program
  4539.    execution speed(S), standardized benchmarks, etc.)
  4540.  
  4541.  - What are the disadvanyages of it being an ANSI-Compiler
  4542.    only?
  4543.  
  4544.  - Is it sufficient to operate in a multi-function enviorment
  4545.    (Multi-User BBSs compiled in it-would they work well?)
  4546.    If not what compilers would?
  4547.  
  4548.  - How efficient is it compared to other compilers?
  4549.  
  4550.  - Is it well equiped for 'heavy duty programming'?
  4551.  
  4552.  What compilers do you suggest - what would be considered much better?
  4553.  
  4554.  I would be very appreciative of any responses. Thank you very much.
  4555.  
  4556.  Aufwiedersehn!
  4557.  
  4558.  
  4559.  
  4560. ---
  4561.  * Origin: Dave's OPUS!/BINK *SDS*SDN*HST* Lowell MA (Opus 1:324/275)
  4562.  
  4563.  
  4564. From:    Mike Hamilton 
  4565. To:      All                                      Msg #230, 07-Jan-88 09:45am
  4566. Subject: Common Data??
  4567.  
  4568.  
  4569. I'm comiling a fairly large program in MSC/QuickC.  Either one I use, I
  4570. always get an error that I have run out of Common Data Memory, or something
  4571. to effect...?  What does this mean, and how can I prevent it?  I have split
  4572. the program into modules.  No good.  I have one structure array of 500,
  4573. which I think may be causing the problem.  What can I do?
  4574. --- QuickBBS v2.03
  4575.  * Origin: The Mystic Tribunal, N. Andover, Ma. (508)689-4493 (1:324/131)
  4576.  
  4577.  
  4578. From:    Ted Shapin 
  4579. To:      All                                      Msg #231, 05-Jan-89 12:22pm
  4580. Subject: Want to count non-comment source lines
  4581.  
  4582. I need to count non-comment source lines in C pgms.
  4583. Do I have to parse the whole C pgm or is there an easier
  4584. way?
  4585. Ted
  4586.  
  4587.  
  4588. --- Opus-CBCS 1.10.v
  4589.  * Origin: Mike's C Board, WOCing the C shore 619-722-8724 (1:202/201.0)
  4590.  
  4591.  
  4592. From:    Jeffrey Nonken 
  4593. To:      George Stanislav                         Msg #232, 07-Jan-89 09:29am
  4594. Subject: Re: Learning C
  4595.  
  4596.  >  > I had never used a debugger before TC 2.0, and I don't
  4597.  >  > expect to use
  4598.  >  > that one very much.  I agree with many of your points
  4599.  > If I did not use a debugger, I would not have the tear line
  4600.  > I do now
  4601.  > - I would still be wondering why I cannot get Opus 1.10
  4602.  > rolling.
  4603.  >
  4604.  > A problem located deep in the library can be discovered
  4605.  > only using a debugger to go through the program byte by
  4606.  > byte.
  4607.  >
  4608. Agreed 100%! I have three main debug techniques, and I mix-and-match 
  4609. 'em all the time.
  4610.  - Stare at the code
  4611.  - Make deductions from the results
  4612.  - Use a debugger (or ICE)
  4613. The thing I like about Codeview-type debuggers is that I can do all three at
  4614. once onscreen!
  4615.  
  4616.  
  4617. --- Opus-CBCS 1.03b <> NoOrigin 3.3
  4618.  
  4619. --- ConfMail V4.00
  4620.  * Origin: On a clear day you can C forever (1:103/522)
  4621.  
  4622. *** Part of a conversation.
  4623.  
  4624.  
  4625. From:    Jeffrey Nonken 
  4626. To:      Mok                                      Msg #233, 07-Jan-89 09:49am
  4627. Subject: Re: HELLO.
  4628.  
  4629.  > MOK!
  4630.  > The Magic Man
  4631. "My name is Mok, and thanks alot!"
  4632.  
  4633. ...but Mok is a bad guy. Any reason you chose him?
  4634.  
  4635.  
  4636. --- Opus-CBCS 1.03b <> NoOrigin 3.3
  4637.  
  4638. --- ConfMail V4.00
  4639.  * Origin: On a clear day you can C forever (1:103/522)
  4640.  
  4641. *** This is a reply to #187.
  4642.  
  4643.  
  4644. From:    Jeffrey Nonken 
  4645. To:      Randall Greylock                         Msg #234, 07-Jan-89 09:56am
  4646. Subject: Re: ZOO listing
  4647.  
  4648.  >  ER> Does your source have configuration for Amiga?  If
  4649.  > so, I would like to
  4650.  >  ER> be able t freq it!
  4651.  >
  4652.  > The sources I have (Z201Src*.Zoo) talks about Amigas.
  4653.  >
  4654. Mine does too, but not where to get it (unless it's by contacting the author).
  4655. I'd be interested in an Amoeba version myself.
  4656.  
  4657.  
  4658. --- Opus-CBCS 1.03b <> NoOrigin 3.3
  4659.  
  4660. --- ConfMail V4.00
  4661.  * Origin: On a clear day you can C forever (1:103/522)
  4662.  
  4663. *** This is a reply to #47.
  4664.  
  4665.  
  4666. From:    jim nutt 
  4667. To:      Mike Housky                              Msg #235, 05-Jan-89 10:54am
  4668. Subject: Re: TC 2.0 woes
  4669.  
  4670. In a message of <03 Jan 89 23:59:32>, Mike Housky (1:103/522.6) writes:
  4671.  
  4672.  >[You speaking to me:]
  4673.  >you> integrated mode nothing... quick c needs it in any enviroment
  4674.  >you> and turbo c is very nearly as memory hungry...
  4675.  >.
  4676.  >Interesting. Are you saying that QCL needs even nearly as much memory as 
  4677.  >QC? Or that TCL needs nearly as much memory as TC? I haven't pushed either 
  4678.  >of these to the limit. (Mainly I use MSC's CL which "gracefully degrades" 
  4679.  >in limited RAM by displaying a warning and limiting or turning off 
  4680.  >optimizations.) Still, I would be sincerely amazed if either T or Q 
  4681.  >requires nearly as much in the command line mode as in the interactive 
  4682.  >mode.
  4683.  
  4684. quick c needs MORE memory to operate from the command line (at least in my
  4685. experience).  it won't even load in 256k.  turbo c isn't quite as bad, the
  4686. integrated enviroment is a separate program from the command line compiler. 
  4687. but it's still a memory hog.
  4688.  
  4689. jim nutt
  4690. 'the computer handyman'
  4691.  
  4692. --- msged 1.962S ZTC
  4693.  * Origin: numerology:  recreational computer science (1:114/15.11)
  4694.  
  4695. *** This is a reply to #222.
  4696.  
  4697.  
  4698. From:    Grant Wagner 
  4699. To:      Scott Ladd                               Msg #236, 05-Jan-89 04:39pm
  4700. Subject: Re: QuickC 2.00
  4701.  
  4702.  
  4703.  > I have talked with Greg Lobdell, the person who oversees
  4704.  > all of the 'Quick' languages at Microsoft. He confirms
  4705.  > my interpretation: you own your source and the resulting
  4706.  > .EXE file. All Microsoft owns is the copyright to the library
  4707.  > routines, for which it charges nothing. Microsoft's license
  4708.  > is worded such that people become confused by it; the only
  4709.  > time you have to give Microsoft any direct credit is when
  4710.  > your use one of their run-time .EXEs, such as BRUN45.EXE
  4711.  > for QuickBASIC, or MSHERC.COM for Hercules compatibility.
  4712.  
  4713.    Thank you for the clear, concise and accurate information regarding 
  4714. this subject (accurate because it comes from someone at Microsoft). I
  4715. appreciate you taking the time to ask about this, it clears up a misconception
  4716. I and others I have talked to seem to have regarding programs compiled using
  4717. Microsoft products.
  4718.  
  4719.    ...Grant
  4720.  
  4721.  
  4722. ---
  4723.  * Origin: Negative Zone * 306-565-8538 (Opus 1:140/34)
  4724.  
  4725. *** This is a reply to #121.
  4726.  
  4727.  
  4728. From:    Ray Gardner 
  4729. To:      Randall Greylock                         Msg #237, 06-Jan-89 02:08pm
  4730. Subject: Re: structure member offsets
  4731.  
  4732.  >  JK> You don't need the tMS variable, since you can just do:
  4733.  >  JK> 
  4734.  >  JK>        C_offset = (size_t) &(((_MyStruct *)0)->C)
  4735.  > 
  4736.  > Earth to moonbase everyone!  I DON'T WANT TO DO THIS AT RUN TIME!
  4737.  > 
  4738.  > Let me restate the problem.
  4739.  > 
  4740.  > Assume TWO structures - _MyStruct as defined above, and:
  4741.  > 
  4742.  > typedef struct {
  4743.  >   char FldNm[30];
  4744.  >   unsigned int Offset;
  4745.  >   } _MyOffset;
  4746.  > 
  4747.  > What I want to do is something like this:
  4748.  > 
  4749.  > _MyOffset = {    /***** error: note missing structure name! -- rdg */
  4750.  >   "Variable C",
  4751.  >   [computed offset to C in _MyStruct goes here]
  4752.  >   };
  4753.  > 
  4754.  > I.E., I want to do it STATICALLY!  At COMPILE TIME.  Not run time.
  4755.  
  4756. Randall, ANSI C has a macro offsetof(structure_type, member_name) for this
  4757. purpose.  Zortech C doesn't come with one (yet), but the following version
  4758. suggested in the ANSI C Rationale seems to work fine, at compile time.
  4759.  
  4760. #define offsetof(type, member) ((unsigned int)(char *)&(((type *)0)->member))
  4761.  
  4762. (The Rationale used size_t instead of unsigned int.  They also note that this
  4763. definition may not be portable to all implementations.)
  4764. (Note similarity to what John Kruper recommended.)
  4765.  
  4766. Then just put offsetof(_MyStruct, C) in your structure initializer.  This
  4767. worked in ZTC and will (I'm guessing) probably work in MSC or TC too.
  4768.  
  4769.  
  4770. --- msged 1.93L ZTC
  4771.  * Origin: Ray Gardner  (1:104/45.3)
  4772.  
  4773.  
  4774. From:    William Herrera 
  4775. To:      Randall Greylock                         Msg #238, 06-Jan-88 07:51pm
  4776. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  4777.  
  4778. >Let me restate the problem.
  4779.  
  4780. >Assume TWO structures - _MyStruct as defined above, and:
  4781.  
  4782. >typedef struct {
  4783. >  char FldNm[30];
  4784. >  unsigned int Offset;
  4785. >  } _MyOffset;
  4786.  
  4787. >What I want to do is something like this:
  4788.  
  4789. >_MyOffset = {
  4790. >  "Variable C",
  4791. >  [computed offset to C in _MyStruct goes here]
  4792. >  };
  4793.  
  4794.  
  4795. compilerdependent()
  4796. {
  4797.     typedef struct
  4798.     {
  4799.         int A;
  4800.         int B;
  4801.         int C;
  4802.     } _MyStruct;
  4803.  
  4804.     typedef struct
  4805.     {
  4806.         char FldNm[30];
  4807.         unsigned int Offset;
  4808.     } _MyOffset;
  4809.  
  4810.     static _MyOffset int_C_offset =
  4811.     {
  4812.         "Variable C",
  4813.         sizeof(_MyStruct) - sizeof(int)
  4814.         /* ! Danger--Does/can my compiler pack structures? */
  4815.         /* If not, I'm out of luck  */
  4816.     };
  4817. }
  4818. (...actually this is easier to do in c++)
  4819. --- QuickBBS v2.03
  4820.  * Origin: C'ing Clearly Into the Wind (303)939-9272 * FidoNet (1:104/63)
  4821.  
  4822. *** Part of a conversation.
  4823.  
  4824.  
  4825. From:    John Kruper 
  4826. To:      Paul Edwards                             Msg #239, 07-Jan-89 02:04am
  4827. Subject: sin() in calculator
  4828.  
  4829. > A bloke I know has written a calculator in C.  Now he wants to add support 
  4830. > for sin, cos, tan, log and any other function that anyone might write at 
  4831. > a later date, such as cfact (for factorials).  Now the functions may take
  4832. > any number of parameters, and return int, float, double etc.  When
  4833. > someone types in sin(3) it is fairly obvious what they want.  But how do
  4834. > you convert this line into a function call to the same name?
  4835.  
  4836. I would use different structures for the different function types. This isn't
  4837. as bad as it may sound, since there are probably only a few different argument
  4838. types needed for the calculator. Like: takes two double arguments and returns
  4839. double. Or: takes one double argument and returns double. Also, you could do
  4840. all of your arithmetic in double precision, and ignore floats and ints. Though
  4841. floating point is slower than integer arithmetic, in a calculator the
  4842. calculating speed probably doesn't matter that much. And any function which
  4843. will only work on integers can convert its double arguments to ints, crunch on
  4844. them, then convert the result back to doubles (which may lead to round off
  4845. problems, but oh well...). You can put a "wrapper" function around any library
  4846. function you want to call which expects an int argument.
  4847.  
  4848. Here's what a table might look like:
  4849.  
  4850. typedef struct {
  4851.        char *name;
  4852.        double (*func)(double);
  4853. } FUNC_1ARG;
  4854.  
  4855. FUNC_1ARG func1[] = {"cos", cos, "sin", sin, "tan", tan};
  4856. #define CNT_1ARG  (sizeof(func1[])/sizeof(FUNC_1ARG))
  4857.  
  4858. And so on for FUNC_2ARGS, FUNC_3ARGS, etc. When presented with a function name
  4859. ("sin" for instance), you could search each of the tables until you find it
  4860. (in func1[]), then you could verify that the user gave it the right number of
  4861. arguments (1 in this case). Or you could first parse the number of arguments
  4862. that the user gave and then check that table for the function name they used.
  4863. (Though from an error message point of view, you probably want to discriminate
  4864. between calling a valid function with the wrong number of arguments, and
  4865. calling a non-existent function. Which means you have to search all of the
  4866. tables anyway to see if the function exists with a different number of
  4867. arguments than the user gave).
  4868.  
  4869. Another approach would be to look up the function name in a table which gives
  4870. the argument list type for each function name.
  4871.  
  4872. /* possible argument and return types */
  4873. enum arg_types {DBL, STRNG, DBL_DBL, DBL_DBL_DBL, DBL_STRNG, STRNG_STRNG};
  4874. enum ret_types {DBL, STRNG}
  4875.  
  4876. struct {
  4877.        char *name;
  4878.        enum arg_types arg;     /* argument list type */
  4879.        enum ret_types ret;     /* return type */
  4880. } functions[] = { "min", DBL_DBL, DBL, "sin", DBL, DBL, "strcat", STRNG_STRNG,
  4881. STRNG, "strlen", STRNG, DBL};
  4882.  
  4883. If the function names are kept in alphabetical order, than a bsearch() would
  4884. be a good way to search the table for a match. 
  4885.  
  4886. After the function name is found in the table, we know what its argument list
  4887. type is, so we can check that the user gave the right number and type of
  4888. arguments. Also, we know how to call the function, and what it returns.
  4889.  
  4890. > 1) Is it ok to call a function with 2 parameters, when it only expects
  4891. >    to receive 1?
  4892.  
  4893. Ummm... It will usually work, since the caller is in charge of dealing with
  4894. the stack. But it isn't guaranteed to work.
  4895.  
  4896. > 2) Is it possible to build a parameter list?
  4897.  
  4898. A C function which expects to be called with three parameters should be called
  4899. with those three parameters:
  4900.  
  4901.           (*fun)(a, b, c);
  4902.  
  4903. There is no easy way around this in C. If you have control over the functions,
  4904. you took change their definitions so that every function takes one argument,
  4905. which is a pointer to a parameter list:
  4906.  
  4907.            (*fun)(ptr_to_parameter_list);
  4908.  
  4909. For instance, if your C library has vprintf(), it is basically another
  4910. interface to the printf() family which uses an argument which is a pointer to
  4911. a variable length parameter list, instead of the ususal printf() variable
  4912. variable length argument list.
  4913.  
  4914. Also, if you feel handy in assembler, you can write a function which takes an
  4915. argument byte count, a pointer to a C function, and a pointer to an argument
  4916. list, and calls the C function with the expected number of arguments. However,
  4917. you have to do this in assembler; it won't work in C.
  4918.  
  4919. --- msged 1.87S ZTC
  4920.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  4921.  
  4922. *** This is a reply to #218.
  4923.  
  4924.  
  4925. From:    John Kruper 
  4926. To:      Randall Greylock                         Msg #240, 07-Jan-89 02:04am
  4927. Subject: Computing address offsets within a structure ...
  4928.  
  4929. >>> I have another structure that would like to know the offset of
  4930. >>> I'd like this second structure to know this  a) without me figuring it 
  4931. >>> by hand, and b) without having an actual variable statically allocated.
  4932.  
  4933. >> The classic trick is get devious about casts and use:
  4934. >> 
  4935. >> #define OffsetOf(name, member)       (size_t) &(((name *)0)->member)
  4936. >> 
  4937. >> This isn't guaranteed to be portable, but it (or some variation 
  4938. >> thereof) "usually" works.
  4939. >> 
  4940. >> ANSI C includes a function/macro called offsetof() in stddef.h for just 
  4941. >> this purpose. My OffsetOf() macro above is one of the implementations 
  4942. >> that the Rationale suggests as possible for the ANSI offsetof().
  4943.  
  4944. > Yes, but can these be used while statically initing ANOTHER structure?  
  4945. > I.E., no ='s?
  4946.  
  4947. I have no idea what you mean by "statically initing" another structure, since
  4948. the only form of initialization that I am aware of involves an '='. If you
  4949. mean:
  4950.  
  4951. struct name {
  4952.        int member1;
  4953.        char *member2;
  4954. };
  4955.  
  4956. struct name2 {
  4957.        int offset;
  4958.        int other_stuff;
  4959. } foo = { (int) &(((struct name *)0)->member2), 0);
  4960.  
  4961. My reading of the ANSI draft (section 3.4 Constant Expressions) says that yes,
  4962. the above method should work. (If that is what you mean by "statically
  4963. initing" without an "="). However, from a practical point of view, you are in
  4964. a not currently well standardized part of the C language, so (1) try it and
  4965. see if it works on the compilers of interest, and (2) be aware that is
  4966. probably somewhat non-portable currently (though as far as I can tell it is ok
  4967. according to ANSI).
  4968.  
  4969. --- msged 1.87S ZTC
  4970.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  4971.  
  4972. *** This is a reply to #38.
  4973.  
  4974.  
  4975. From:    John Kruper To:      Randall Greylock                         Msg #241, 07-Jan-89 02:23am
  4976. Subject: Re: COMPUTING ADDRESS OFFSETS WITHIN
  4977.  
  4978. RG = Randall Greylock
  4979. ??? = someone else who responded to RG's initial question
  4980.  
  4981. [the initial question from RG]
  4982.  
  4983. RG> typedef struct {
  4984. RG>   int A;
  4985. RG>   int B;
  4986. RG>   int C;
  4987. RG> } _MyStruct;
  4988.  
  4989. [a suggested solution, which unfortunately doesn't solve the problem, since]
  4990. [it computes at run-time, not compile-time]
  4991.  
  4992. ??>     int C_offset;
  4993. ??>     _MyStruct *tMS = (_MyStruct *)0;
  4994. ??>     C_offset = (int)( (long)( &tMS->C ) - (long)( tMS ) );
  4995.  
  4996. [a comment to ?? from me pointing out a way to simplify the above]
  4997.  
  4998. JK> You don't need the tMS variable, since you can just do:
  4999. JK> 
  5000. JK>        C_offset = (size_t) &(((_MyStruct *)0)->C)
  5001.  
  5002. RG> Earth to moonbase everyone!  I DON'T WANT TO DO THIS AT RUN TIME!
  5003.  
  5004. Although your quoting destroyed who said what to whom, I'm pretty sure the
  5005. above "re-enactment" is correct. In other words, (key point here) I said my
  5006. "C_offset = " comment in response to someone else's "C_offset = " approach. I
  5007. was pointing out a way to simplify the expression they offered. I *didn't*
  5008. worry about keeping to the terms of your original request (compute at compile
  5009. time, not run time) because I had earlier written a reply to your original
  5010. question, containing an approach which should work at compile time. And
  5011. judging from the time of your replies, you saw my message containing a compile
  5012. time approach a full day before you saw my comment above (which in any case
  5013. was commenting on someone elses approach, and wasn't addressed to you).
  5014.  
  5015. Anyway, its pretty easy to see how to get from my suggestion above to a
  5016. compile time initialization of a structure member. You just move everything
  5017. that is to the right of the '=' sign (in the assignment to C_offset) to the
  5018. appropriate place inside the structure initialiazation. After all, in both
  5019. cases they are just assignments - the expression will look the same in both
  5020. cases. The only issue is whether the compiler thinks the expression is a
  5021. constant which can be computed at compile time. According to my reading of
  5022. ANSI, it should work. (Also, the other person's suggested approach assumed at
  5023. least one instance of the structure - tMS - had been declared. Not an onerous
  5024. restriction, but still a restriction of that approach, which I removed with my
  5025. suggested change).
  5026.  
  5027. Otoh, in my reply to you (which I know you've read, since you replied to it a
  5028. full day before your "earth to moonbase" comment above), since you asked for
  5029. an approach which could work in a structure initialization (at compile time),
  5030. my suggestion took the form of a macro which could do just that.
  5031.  
  5032. So, I am definitely not thrilled to get a message written to me (quoting
  5033. things I said to someone else in a different context) which says:
  5034.  
  5035. > Earth to moonbase everyone! I DON'T WANT TO DO THIS AT RUN TIME!
  5036.  
  5037. Answering in the same vein: BUT MY REPLY TO YOU SUGGESTED A COMPILE TIME 
  5038. METHOD. WHY HAVEN'T YOU TRIED IT?
  5039.  
  5040. (Actually, since in these pre-ANSI days this is a grey area in C, it is
  5041. possible your compiler will gag and won't accept this at compile time. But in
  5042. any case there is only one way to find out: try it!)
  5043.  
  5044. RG> What I want to do is something like this:
  5045. RG> 
  5046. RG> _MyOffset = {
  5047. RG>   "Variable C",
  5048. RG>   [computed offset to C in _MyStruct goes here]
  5049. RG>   };
  5050. RG> 
  5051. RG> I.E., I want to do it STATICALLY!  At COMPILE TIME.  Not run time.
  5052.  
  5053. Well, did you try what I suggested in my message to you????
  5054.  
  5055. #define OffsetOf(name, member)     (&(((name *)0)->member))
  5056.  
  5057. Use the OffsetOf macro in the structure initialization just the way you would
  5058. expect:
  5059.  
  5060. struct {
  5061.        char *name;
  5062.        int offset;
  5063. } _MyOffset = {"Variable C", OffsetOf(_MyStruct, C)};
  5064.  
  5065. Of course, its quite possible that you didn't understand my original reply
  5066. (either because I explained it in a lousy way, or because you don't understand
  5067. this aspect of C). In which case, a request for clarification might have been
  5068. more appropriate than your "earth to ..." comment.
  5069.  
  5070.  
  5071. --- msged 1.87S ZTC
  5072.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  5073.  
  5074. *** This is a reply to #238.
  5075.  
  5076.  
  5077. From:    John Kruper 
  5078. To:      Bob Stout                                Msg #242, 07-Jan-89 02:35am
  5079. Subject: Re: Walter and Micro C
  5080.  
  5081. This is only vaguely relevant to what you've been talking about (writing C
  5082. program so the compiler can generate more efficient code), but here goes
  5083. anyway <grin>.
  5084.  
  5085. Have you ever read Jon Bentley's "Writing Efficient Programs" or "Programming
  5086. Pearls"? I just finished working through them and found them quite valuable.
  5087. Though many of the examples are in C, mostly he is talking about more general
  5088. things to speed up programs. Both at high levels (choosing the right
  5089. algorithm, choosing the right data structure), and at low levels (writing a
  5090. loop in the most efficient manner). The problems at the end of the chapters
  5091. are just full of really neat, tricky, difficult, useful programming puzzles.
  5092. (Which is why I said I "worked" through the book, as opposed to simply reading
  5093. it). 
  5094.  
  5095. Examples of what I mean by puzzles: (1) Given a an array of N integers (i.e.
  5096. unordered positive and negative numbers), find the contiguous subarray with
  5097. the maximum sum. (As a special case, if all of the numbers in the array are
  5098. negative, report that no subarray qualifies). For instance, with an input
  5099. array of:
  5100.  
  5101.    31 -41 59 26 -53 58 97 -93 -23 84
  5102.  
  5103. the algorithm would report that the contiguous subarray with the maximum sum
  5104. has a sum of 187 and extends from the 59 to the 97. There is a clever way to
  5105. do it this in only one pass over the array. 
  5106.  
  5107. (2)  Counting bits. Count the number of bits that are on in a 32 bit word.
  5108. Assume that speed is critical, and that you can use as much data space as
  5109. necessary. Then assume the reverse is true. Then assume some reasonable
  5110. compromise between the two.
  5111.  
  5112. A lot of the stuff he talks about is similar to the stuff you find in Knuth's
  5113. work. He has another book called "More Programming Pearls", but it isn't as
  5114. useful from an efficiency point of view. His later columns in the ACM are
  5115. mostly about things I don't find as relevant, like the glories of languages
  5116. like awk, and things like that.
  5117.  
  5118. --- msged 1.87S ZTC
  5119.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  5120.  
  5121. *** Part of a conversation.
  5122.  
  5123.  
  5124. From:    Bob Roden @ 914/201 
  5125. To:      All                                      Msg #243, 06-Jan-89 09:31pm
  5126. Subject: Turbo C 2.0 Problem
  5127.  
  5128. I just made the overdue jump from QuickC to TurboC 2.0, and am 
  5129. not yet very familiar with the new environment.  I have a 
  5130. problem trying to use third party code.  Specifically, I bought 
  5131. a package called "C Database Toolbox," and I want to try using 
  5132. some of the routines.  I installed them in their own 
  5133. subdirectory under my "TC" subdirectory.  So far, so good.
  5134. I added the subdirectory -- "c:\tc\dbtools" -- on the "include 
  5135. directories" and "library directories" lists under the Options 
  5136. menu in the Turbo C 2.0 environment.  I included in my working 
  5137. file the appropriate header file (isam.h) that the database 
  5138. functions call for.  But after doing all of this, I can't get 
  5139. anything to link.  I get messages saying that the function names 
  5140. I'm attempting to used are "undefined symbols."  And in the 
  5141. message stating the error, a leading "_" is attached to the 
  5142. names it thinks are undefined (e.g., "icreatedb" is listed as 
  5143. "_icreatedb".  
  5144. So I'd appreciate any help on this problem, from either of two 
  5145. angles: (1) What is going on here? or (2) More generally, how do 
  5146. you use third party routines from within the Turbo C 2.0 
  5147. environment?
  5148. As a final note I add that the manuals were no help at all on 
  5149. this one.
  5150.  
  5151. --- RBBSMAIL 17.1A
  5152.  # Origin: SF PCUG BBS (415)621-2609-HST-(FIDO 1:125/41) (RBBS-PC 8:914/201)
  5153.  * Origin: Network Gateway to RBBS-NET  (RBBS-PC 1:103/710)
  5154.  
  5155.  
  5156. From:    John Kruper 
  5157. To:      Randall Greylock                         Msg #244, 07-Jan-89 02:56am
  5158. Subject: Offsets of members within structures (working example)
  5159.  
  5160. Since there seems to be some confusion as to how my OffsetOf() macro can be
  5161. used to initialize a structure member at compile time, I decided the best
  5162. explanation was a working test program. The following compiles with no
  5163. Kd±rnings or errors under Microsoft C5.1 at warning level 3, and runs
  5164. correctly.
  5165.  
  5166. #include <stdio.h>
  5167.  
  5168. #define OffsetOf(name, member)    ((int)(&(((struct name *)0)->member)))
  5169.  
  5170. struct foo {
  5171.     int member1;
  5172.     char *member2;
  5173. };
  5174.  
  5175. struct foo2 {
  5176.     int offset;    /* the offset of the member within the structure */
  5177.     int member2;   /* dummy - we'll just always set it to zero */
  5178. } goo[] = { OffsetOf(foo, member1), 0, OffsetOf(foo, member2), 0};
  5179.  
  5180. int main(void);
  5181.  
  5182. int main()
  5183. {
  5184.    printf("offset of member 1 in the foo structure: %d\n", goo[0].offset);
  5185.    printf("offset of member 2 in the foo structure: %d\n", goo[1].offset);
  5186.    return 0;
  5187. }
  5188.  
  5189.  
  5190. --- msged 1.87S ZTC
  5191.  * Origin: A point in space (off of P.I.E.)  ( 1:343/27.3)
  5192.  
  5193.  
  5194. From:    Chris Brougham 
  5195. To:      All                                      Msg #245, 04-Jan-89 12:33am
  5196. Subject: Midi
  5197.  
  5198.  
  5199.  
  5200.     Last month there were a few questions regarding MIDI and C. At
  5201. one time I had the answers but now I've forgotten the questions, except
  5202. for one...it was about a book called "C Programming for MIDI" By Jim Conger.
  5203. It's published by M&T Publishing Inc. Redwood Calf, 1988. Price in 
  5204. Canada $33.95. A reasonable book that gets you going. It explains
  5205. how to go about writing a simple one track MIDI recorder and includes the
  5206. source code for that example as well as the source for a patch librarian
  5207. that works with the Alpha Juno-2 synthesizer. The best part of the book is
  5208. the assembly encoded C functions that send and receive data to the MPU-401
  5209. (or clone).
  5210.  
  5211.     For those who are interested in C programming for MIDI there is quite
  5212. a bit of information available on MIDI specific BBSes and there is the
  5213. National Echomail Midi-Net which is an invaluable source to those
  5214. intersted in this subject (usually!). One thing that should be purchased
  5215. before any programming on IBM based machines which use the MPU-401 is the
  5216. MPU Technical Reference Manual published by Roland (about $10.00).
  5217. It lists the hex commands that the device understands.
  5218.  
  5219. Tons (or tonnes) of things we can talk about but its getting late
  5220. so I gotta go.
  5221.  
  5222.  
  5223. ---
  5224.  * Origin: Energy (Opus 1:30052/3)
  5225.  
  5226.  
  5227. From:    Chris Brougham 
  5228. To:      All                                      Msg #246, 04-Jan-89 12:34am
  5229. Subject: Windows
  5230.  
  5231.     Anyone know of a windowing package that works with Quick C.
  5232. I'm looking for either reference materials (books, magazine articles etc.)
  5233. that include examples of code, or some toolbox "thing" that I can use
  5234. to call ready made C functions.
  5235.  
  5236. Thanks in advance.
  5237.  
  5238.  
  5239.  
  5240.  
  5241. ---
  5242.  * Origin: Energy (Opus 1:30052/3)
  5243.  
  5244.  
  5245. From:    Chris Shutters 
  5246. To:      Rod Whitworth                            Msg #247, 05-Jan-89 09:11pm
  5247. Subject: Walter and Micro C
  5248.  
  5249.  CS> the optimizer. The one that most intrigued me was his advice on ordering
  5250.  CS> of functions in sourc% dodules. He basically advocates pascal function
  5251.  
  5252.  RW>  Years ago Whitesmiths had a command called LORDER which resolved   RW>
  5253. temporal
  5254.  RW> dependencies in linking (unless they were circular). Does this mean the 
  5255.  RW> same thing? The latest MC hasn't made it here yet.
  5256.  
  5257.    The impression I got from Walter's article was that most optimizers find it
  5258. easier to optimize a program that is written in "pascal" order; i.e. main() at
  5259. the end of the source file, with support functions appearing earlier in the
  5260. file, and the deepest nested source function appearing first.
  5261.  
  5262. Chris Shutters
  5263.  
  5264.  
  5265. --- msged 1.90S TC2
  5266.  * Origin: Copyright (C) 1989 by Me (1:128/13.6)
  5267.  
  5268. *** This is a reply to #242.
  5269.  
  5270.  
  5271. From:    Chuck Forsyth 
  5272. To:      Paul Allen                               Msg #248, 07-Jan-89 10:12am
  5273. Subject: Re: zortech, c++
  5274.  
  5275. Since I'm just getting into oops myself, let me say that c++ seems to be, at
  5276. first glance, a superset of C with major enhancements. More operators for
  5277. different and new operations, and a distinctly different perspective on how
  5278. functions are treated. Zortech has a really good offer for their compiler and
  5279. the few definitive books available on the subject. For about $200 you can find
  5280. out just about anything you'd want to know. I like the compiler, and I'm
  5281. having fun with the language.
  5282. I strongly recommend it.
  5283. cf 
  5284.  
  5285. ---
  5286.  * Origin: IASD ENG BBS The Software Engineer's Exchange *HST* (Opus 1:114/18)
  5287.  
  5288. *** This is a reply to #137.
  5289.  
  5290.  
  5291. From:    Charlie Frnka 
  5292. To:      Roy Tellason                             Msg #249, 06-Jan-89 06:48pm
  5293. Subject: Re: Programming in C
  5294.  
  5295.  >  I'd recommend "Software Tools" by Kernighan and Plauger,  
  5296.  > "Reliable Data  
  5297.  >  Structures in C" by Thomas Plum,  and "Variations in C" by Steven  
  5298.  >  Schustack.  
  5299.  
  5300. I've been looking for "Reliable Data Structures in C" for awhile now, and I've
  5301. not seen it anywhere.  Is it an old book?
  5302.  
  5303. --- PointEd 0.30
  5304.  * Origin: PointBlank (1:104/36.6)
  5305.  
  5306. *** This is a reply to #214.
  5307.  
  5308.  
  5309. From:    Jeff Kirkley 
  5310. To:      All                                      Msg #250, 08-Jan-89 03:36am
  5311. Subject: Compilers and Books
  5312.  
  5313. .
  5314. .
  5315. Hello again!!!!  Tell me something ya'll, what do you think is the best
  5316. language out there, as far as C, Pascal, Mod-2, whatever, the selling company,
  5317. and also reference books or starting out user's manuals???
  5318. I would like to know what would be the best investment as far as compilers go?
  5319. Right now, I'm a Pascal fan, love to program in it, do it all the time in
  5320. school.  Now, I have an Amy 500, w/ 512k RAM; not too much, but hey it gets
  5321. around.  Talk to me, PLEASE!!!!!!!!
  5322. .
  5323. .
  5324.                                                      Jeff Kirkley
  5325.  
  5326.  
  5327. ---
  5328.  * Origin: The Commodore Club of Colorado Springs (Opus 1:128/29)
  5329.  
  5330.  
  5331. From:    Chris Sebrell 
  5332. To:      Malcolm Petcher                          Msg #251, 05-Jan-89 06:18pm
  5333. Subject: Re: Learning C
  5334.  
  5335.   I agree that the VAX Symbolic Debugger is good, however, it has
  5336. problems with C-Code (due to the fact that the Debugger itself 
  5337. was written in C).  I find it much more useful when debugging Pascal
  5338. programs than C.
  5339.                                   -Chris Maverick Sebrell
  5340.  
  5341.  
  5342. ---
  5343.  * Origin: Wilton Woods OPUS Wilton,CT (HST) (203)762-8481 (Opus 1:141/250)
  5344.  
  5345. *** This is a reply to #232.
  5346.  
  5347.  
  5348. [251] Highest: 251
  5349. ECHO area 31 ... C language echo
  5350. Type `?' by itself for help
  5351. A)rea change       N)ext (read msg)   P)rior msg         E)nter message
  5352. R)eply             =)read non-stop    -)read original    +)read reply
  5353. L)ist (brief)      I)nquire           M)AIN MENU         G)oodbye (logoff)
  5354. K)ill message      U)pload            
  5355. Select: y]ryMw3mr