bill@chinet.chi.il.us (Bill Mitchell) (12/30/89)
In a recent posting, I asked about missing lib routines. Thanks to Robert Hall for email suggesting that these routines are assembly files found in libc.a. I looked there, and found most of them. Unfortunately, only two of these routines (cmi4.s and return.s) are in assembler source code form. The rest are in object form only and contain non-ascii stuff. Some routines (unget.s memmove.s strcoll.s and strxfrm.s) are not in the PH 1.3 distribution at all. I checked the libsrc.a.Z file from my PH 1.3 distribution, and can find no source for these routines there either. Thanks to David Lawyer and Glen Overby for the info that some of these are compiler specific routines for which no source code is available, and some are machine specific support routines. I've made a guess at which of my missing routines are compiler specific and which are machine specific. Could a minix wizard please confirm or correct this? From their names alone, the following don't sound like compiler specific routines: _dup.s brksize.s catchsig.s getutil.s sendrec.s setjmp.s strhp.s unknown.s vars.s unget.s memmove.s strcoll.s strxfrm.s I am unable to find source code for any of these. I don't find even object versions of unget.s, memmove.s, strcoll.s, or strxform.s in my PH 1.3 distribution. Is source for these routines available? If so, where? If not, what now? Assuming source is available, it goes in a directory something like /lib/i8088 in the official MINIX directory tree, right? From their names alone, the following sound as if they might be compiler specific: adi.s and.s blm.s cii.s cmi4.s cms.s cmu4.s com.s csa2.s csb2.s cuu.s dvi4.s dvu4.s exg.s fakfp.s fat.s gto.s iaar.s ilar.s inn.s ior.s isar.s lar2.s lfr6.s lfr8.s loi.s mli4.s mon.s nop.s rck.s ret6.s ret8.s retarea.s return.s rmi4.s rmu4.s sar2.s sbi.s set.s sti.s stop.s trp.s xor.s I should just use the object versions from my PH 1.3 libc.a file, right?
nfs@notecnirp.Princeton.EDU (Norbert Schlenker) (12/30/89)
In article <1989Dec29.192941.2148@chinet.chi.il.us> bill@chinet.chi.il.us (Bill Mitchell) writes: >In a recent posting, I asked about missing lib routines. >... >setjmp.s strhp.s unknown.s vars.s unget.s >memmove.s strcoll.s strxfrm.s > >I am unable to find source code for any of these. I don't find even >object versions of unget.s, memmove.s, strcoll.s, or strxform.s in >my PH 1.3 distribution. Is source for these routines available? >If so, where? If not, what now? Assuming source is available, it >goes in a directory something like /lib/i8088 in the official MINIX >directory tree, right? I have no idea what unget.s is - I have a strong suspicion it's a typo on Andy's part (i.e. it should be ungetc). As for memmove, strcoll, and strxfrm, they are ANSI mandated routines in the string library. My assembly language version (for PC's) will include them if Andy gets around to posting it. For the benefit of those who want them now, and for the Atari owners out there, below are some C versions that will serve. >From their names alone, the following sound as if they might be compiler >specific: >... many routine names omitted >I should just use the object versions from my PH 1.3 libc.a file, right? Right. Norbert ------------------------------- Snip snip --------------------------------- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # memmove.c # strcoll.c # strxfrm.c # This archive created: Sat Dec 30 01:48:31 1989 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'memmove.c' then echo shar: "will not over-write existing file 'memmove.c'" else cat << \SHAR_EOF > 'memmove.c' /* memmove.c */ /* Moves a block of memory (safely). */ /* Calls memcpy(), so memcpy() had better be safe. */ /* Henry Spencer's routine is fine. */ #include <string.h> void *memmove(s1, s2, n) void *s1; void *s2; size_t n; { return memcpy(s1, s2, n); } SHAR_EOF fi if test -f 'strcoll.c' then echo shar: "will not over-write existing file 'strcoll.c'" else cat << \SHAR_EOF > 'strcoll.c' /* strcoll.c */ /* Compares the strings s1 and s2 in light of the current locale setting */ /* WARNING: This is a bogus implementation, since I have no idea what */ /* ANSI is prattling about with respect to locale. */ #include <string.h> int strcoll(s1, s2) char *s1; char *s2; { return strcmp(s1, s2); } SHAR_EOF fi if test -f 'strxfrm.c' then echo shar: "will not over-write existing file 'strxfrm.c'" else cat << \SHAR_EOF > 'strxfrm.c' /* strxfrm.c */ /* Transforms s2 into s1. The effect is to make strcmp() act on the */ /* transformed strings exactly as strcoll() does on original strings. */ /* WARNING: This is a bogus implementation, since I have no idea what */ /* ANSI is prattling about with respect to locale. */ #include <string.h> size_t strxfrm(s1, s2, n) char *s1; char *s2; size_t n; { strncpy(s1, s2, n); return strlen(s2); } SHAR_EOF fi exit 0 # End of shell archive
dcd@tc.fluke.COM (David Dyck) (12/31/89)
In article <1989Dec29.192941.2148@chinet.chi.il.us> bill@chinet.chi.il.us (Bill Mitchell) writes: >In a recent posting, I asked about missing lib routines. > >Thanks to Robert Hall for email suggesting that these routines >are assembly files found in libc.a. I looked there, and found >most of them. Unfortunately, only two of these routines (cmi4.s >and return.s) are in assembler source code form. The rest are >in object form only and contain non-ascii stuff. use libupack to convert the 'non-ascii' .s files to a more readable form.
EPRF%SNYCENVM.BITNET@cornellc.cit.cornell.edu (Peter Flass) (01/03/90)
Don't forget that Minix "object" format is only packed assembler. To get a "source" use: libupack<object>source (don't use the same names). - Pete +---------------------------------------------------------------------------+ | | | Peter Flass BITNET: EPRF@SNYCENVM (preferred) | | Director of Computing Services INTERNET: ESCFLASS@UBVM.CC.BUFFALO.EDU | | SUNY Empire State College AT&TNET: (518)587-2100 X350 | | 2 Union Avenue "After three days without programming, | | Saratoga Springs NY 12866 Life becomes meaningless" | | - The Tao of Programming | +---------------------------------------------------------------------------+