Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!PAVEPAWS.BERKELEY.EDU!dillon From: dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) Newsgroups: net.micro.amiga Subject: Using Astartup.obj instead of Lstartup.obj, C Philosophy Message-ID: <8606132340.AA09523@pavepaws> Date: Fri, 13-Jun-86 19:40:39 EDT Article-I.D.: pavepaws.8606132340.AA09523 Posted: Fri Jun 13 19:40:39 1986 Date-Received: Tue, 17-Jun-86 19:32:15 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 48 As you all know, using Astartup.obj instead of Lstartup.obj means you don't have to include lc.lib (for lattice users). I've been able to reduce many of my programs from 13000 to 2000 bytes in this way by writing my own 'stdio' library. It also means that many 'unix' functions are not available to you anymore unless you write them yourself (e.g. as a library). However, amiga.lib contains back-off versions of some UNIX functions, such as printf. Could someone at C-A post a list of functions contained in amiga.lib? They don't all seem to be documented. -Matt --------------- Note on 16/32 bit int compiling: I myself use 32-bit int compiling exclusively (maybe because I only have Lattice C). A lot of my code reflects this by the general assumption that pointers are the same size as ints. Frankly, I don't care a whit about portability because I have found, over the years, that porting somebody else's programs to a different machine (example: BSD4.2 to PC-XT) usually requires a major overhaul. In addition, many programmers who DO follow strict typing STILL assume int's are 32 bits (those who work with 32 bit compilers, that is), and that assumption can lead to many hard-to-find problems which have nothing to do with pointers WHEN you are porting from 32 to 16 bit compilers. For instance, loops, or system calls (the seek() between UNIX and micro's, and even System 5, was a classic problem). I just assume the machine I'm porting to has a 32 bit compiler on it. Don't get me wrong though... If I intend to write a general program which sticks to simple OPEN's and STDIO that would be useful on any machine, I'll write it portable and strict. In the case of the Amiga, with all the totally custom libraries etc... I don't see any reason to stick to strong typing. The code will never be ported to anything but a later version of the Amiga, a Mac, or some other 32 bit machine. And besides, 16 bit machines are going out the door... when, in a decade, 32 bit machines go away in favor of 64 bit machines (or whatever), my code will be completely upward compatible. -Matt