Thread View: mod.computers.apollo
1 messages
1 total messages
Started by Russ Fish
Thu, 20 Mar 1986 16:29
(none)
Author: Russ Fish
Date: Thu, 20 Mar 1986 16:29
Date: Thu, 20 Mar 1986 16:29
39 lines
2260 bytes
2260 bytes
Date: Wed, 19 Mar 86 05:35:40 MST From: fish@utah-gr (Russ Fish) Newsgroups: mod.computers.apollo Subject: Re: need sprintf for BSD4.2/IX References: <8603130738.AA13849@mips.UUCP> Reply-To: fish@utah-gr.UUCP (Russ Fish) Organization: University of Utah CS Dept Apparently-To: apollo@yale.arpa > Or, to ask another way, does anyone know what to replace _IOSTRNG > with to port sprintf-like functions from VAX 4.2 to Apollo "4.2"? Try this: #ifdef apollo /* Apollo Stdio compatibility definitions. */ #define _IOREAD _SIRD /* (1) */ #define _IOWRT _SIWR /* (2) */ #define _IONBF _SIUNB /* (4) */ #define _IOMYBUF _SIUBF /* (8->256, Apollo 8 is malloc'ed buffer.) */ #define _IOEOF _SIEOF /* (16) */ #define _IOERR _SIERR /* (32) */ #define _IOSTRG 01000 /* (64->512, not Apollo supplied.) */ #define _IOLBF _SINLB /* (128->64) */ #define _IORW _SIUP /* (256->128) */ #endif Since everybody is getting into the business of rewriting stdio these days, I think it is becoming questionable practice to know about the internal stdio FILE structure and flags, at least if you care about your programs running on other computers. I intend to use these definitions in our code only as a stopgap until I kill off the sprintf clones. I looked through our code here, and found only two functions using _IOSTRG. They are being clever in different ways to accumulate a string across multiple printfs. Both of them could instead use sprintf with a moving buffer base pointer to accomplish the same function portably with little loss of "efficiency" (no inner loops are involved.) -Russ Fish
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads