www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/07/13/12:01:40

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Message-Id: <3.0.32.19980713135711.0096d7b0@xs4all.nl>
X-Sender: diep AT xs4all DOT nl
X-Mailer: Windows Eudora Pro Version 3.0 (32)
Date: Mon, 13 Jul 1998 13:58:03 +0000
To: Heinrich Opgenoorth <opgenoorth AT gmd DOT de>
From: Vincent Diepeveen <diep AT xs4all DOT nl>
Subject: thanks and gcc burn in test...
Cc: beastium-list AT Desk DOT nl
Mime-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 71

At 10:13 AM 7/13/98 +0200, Heinrich Opgenoorth wrote:
>On 11 Jul, Vincent Diepeveen wrote:
>> Now i'm editting in good old emacs, and i see my text all in the same
color.
>> 
>> How can i see all my sources in color with linux using emacs?
>
>You need to tell emacs to turn on "Font lock mode" --- for a start, you
>can put the following line in your ~/.emacs file:
>
>     (global-font-lock-mode t)

>This will activate syntax highlighting for C, C++, Java etc.
>If you have a recent version of emacs (20.x) you don't need to edit
>~/.emacs; you can do it interactively by typing M-x customize; then
>go to "Faces" -> "Font Lock". Here you can customize colors etc.
>

Thanks to all for the help!

>And another thing re. an earlier question of yours:
>>int ReturnFloepWindow(char *sOut) {
>>  printf("%s\n",sOut);
>>  gets(sOut);
>>  return(true);
>>}
>>
>>"the 'gets' function is dangerous and should not be used."
>
>(Answer from Tuukka Toivonen):
>>>The gets() function does not check how long string the user
>>>gives; if it is too long string and does not fit in sOut
>>>array, you have a bug in your program (memory corruption).
>
>>120 bytes. Why would it give memory corruption, knowing it's just a pointer
>>to an existing array of 120 bytes? I only give it an address where it needs
>>to put the small string. 
>
>You know of all those security holes showing up lately in different
>Unix programs? Most of them are caused by "Stack smashing" (overwriting
>the return address of a function on the stack). Well, use of gets() for
>user input is the main reason for these problems (and also the reason
>this warning was introduced in recent versions of gcc). You would be
>well advised to take heed of the warning, unless you know very well
>what you are doing...

Yes i know very well what i'm doing. This linux program is in fact a chess
program which is compiled only once for linux in order to test at
2 computers (my own one, and a 4 processor machine). 

The 'commercial version' runs under DOS and soon win-nt/95 too.

Normally all communication goes through pipe communicating
with interface, but sometimes it's handy to hand-do things.

As linux programs are too easy to copy (how to protect linux programs?), 
i don't sell nor copy this version, so no security gaps or anything.

btw: The pipe reading makes use of fread reading stdin.

I'm now transferring gcc 2.8.1 and pgcc to linux, So after i manage to install
those compilers i'll write here a report how slow/fast the compilers are for
integer applications like chessprogram.

gcc 2.7.2 is 10% slower than msvc++ 5.0, and 2.7.2 can only do 486
optimizations right?

Vincent
>Regards
>         Heinrich


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019