Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!ub!ubvmsd.cc.buffalo.edu!v069qqqc From: v069qqqc@ubvmsd.cc.buffalo.edu (Michael Carrato) Newsgroups: comp.sys.amiga Subject: C standard across machines (question). Message-ID: <43072@eerie.acsu.Buffalo.EDU> Date: 29 Oct 90 07:33:16 GMT Sender: news@acsu.Buffalo.EDU Reply-To: v069qqqc@ubvmsd.cc.buffalo.edu Organization: University at Buffalo Lines: 41 Nntp-Posting-Host: ubvmsd.cc.buffalo.edu News-Software: VAX/VMS VNEWS 1.3-4.3 I am writing a general purpose database in C. I'm developing it for the company I work for so I'm doing it with the ibm XT's they have in mind. However, I would like to eventually Amiga-tize it and release it as (probably) shareware. I would therefore prefer to make the program (as well as the database format) as portable as possible. The problem is, (correct me if I'm wrong) Intel machines are "little endian" whereas Motorolas are "big endian". I assume C adopts one of these standards to maintain protability of files between machines. My question is, which is the C standard, and how do I ensure that a database created on the ibm version will not be garbage on the Amiga version. (To add to the confusion, I'm doing the development on a sun... I have no idea what the sparc standard is!) As it stands now, I'm using fread() and fwrite() for my file i/o. I KNOW this must be wrong, since it's simply a binary image transfer. Is there any general way to read/write a block of data so that this mess can be resolved, or do I have to write code to output the data byte-by-byte? Forgive me if I'm making a mountain out of a molehill, but I want to be sure before I go ahead with this thing.. As a side note, is there any demand for this type of program in the Amiga community? I have seen few general purpose PD/Freeware/Shareware database programs out there, and I've been tempted to go out and buy SuperBase or some such commercial program. (Why haven't I? I'm broke! :-(..). I would think there are others in my position... looking for a decent, cheap database. Also, if you are interested, what features would you like to see? I plan to intuitionalize it, and add an AREXX port.. (I don't have AREXX yet but I'm working on it.. poor college student :-}). The program so far is built to handle a large number of records fairly quickly, and I hope to eventually include a report generator and some other goodies. Thanks for enduring all of this babble... Mike Carrato SUNY at Buffalo, senior in computer engineering.