delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/30/02:35:06

Xref: news2.mv.net comp.os.msdos.djgpp:4363
From: <rkwcvdz AT rivier1 DOT puk DOT ac DOT za>
Newsgroups: comp.os.msdos.djgpp
Subject: Moving from Pascal to Djgpp
Date: Wed, 29 May 96 09:01:36
Organization: University of Potchefstroom
Lines: 65
Message-ID: <46251.rkwcvdz@rivier1.puk.ac.za>
NNTP-Posting-Host: v-multi1.puk.ac.za
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi. Firstly i would like to thank all that replied to my first query ,and i 
would like to say that i really appreciated it.

Now for my Questions .

[1] File Bloat . Why are the Files Compiled with Djgpp so Bloated . The 
    Standard Hello world program compiled with Gcc -o Hello.exe Hello.c was 
    nearly 58k ,and if i used Gcc -s -o Hello.exe hello.c it came down to 
    20k.In comparison the same Program in Borland Pascal 7.0 Real mode is 
    2.9kb and 8,2kb for Protected mode (with the stub included). Whats the 
    most effecient way to Compile Small Programs.Also a C++ version is even 
    more bloated why ?

[2] Can someone tell me what is wrong with the Following Program fragment
    #include <stdio.h>
     
     int main(void);
     void exit(int);
     
     int main(void)
{
  int c;
   File *fin, *fout;
   fin = fopen("in.dat", "r");
   if (fin == NULL) {
    printf("Unable to open file in.dat\n");
    exit(1);
    }

  fout = fopen("out.dat", "w");
  if (fout == NULL) {
   printf("unable to open file out.dat\n");
   exit(2);
    }
  while ((c=fgetc(fin)) != EOF) {
   if (fputc(c, fout) != c) {
    printf("Error writing out.dat\n");
    exit(3);
   }
 }
fclose(fin);
fclose(fout);
return 0;
}

Why doesnt this Program Compile ... I get errors while compiling it. ?
Is the above Program Structurally correct ?

[3] Is there a program to translate Tasm files to Gnu Files.

[4] Does anyone know anything about the Gnu Pascal Compiler 

Sorry for making this letter so long

Thanx in advance 
rkwcvdz AT rivier1 DOT puk DOT ac DOT za

*****************************************
*                                       *
*  Faithless is he that says farewell , *
*  When the road darkens                *
*                                       *
*  J.R.R.Tolkien The Lord of The Rings  *
*                                       *
*****************************************

- Raw text -


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