Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!nike!ucbcad!ucbvax!ESTEC.BITNET!TPC862 From: TPC862@ESTEC.BITNET Newsgroups: net.micro.atari16 Subject: ARXX, Public Domain replacement of AR68 (Part 1 of 2) Message-ID: <8610280904.AA07156@ucbvax> Date: Mon, 27-Oct-86 09:35:11 EST Article-I.D.: ucbvax.8610280904.AA07156 Posted: Mon Oct 27 09:35:11 1986 Date-Received: Tue, 28-Oct-86 21:04:11 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 251 Part 1 never made it to info-atari16 when I posted it together with part 2. So here it is. ---------------------------------------------------------------------- This is part 1 of a 2 part posting of ARXX. I wrote ARXX because my version of AR68 was unusable to make own object libraries for use with LINK68. AR68 could list the contents of a library and extract modules from the library, but replacing and adding new modules did not work correctly (e.g. all module names were converted to upper case when adding to the library, while extracting forced names to lower case -> impossible to extract modules you added yourself). Below you will find ARXX.DOC and an example of the output of the -tv option (list contents). Part 2 will consist of the uuencoded ARXX.ARC containing the sourcefiles, the program and ARXX.DOC. So if you can use it you only need part 2. Some things I found out while writing and testting ARXX: - stderr in ALCYON C (=Toolkit C compiler) uses GEMDOS handle 1, as does stdout. So redirecting stdout in Micro C-Shell redirects both stdout and stderr. - You can prevent redirection for the standard GEMDOS handles by using negative handles (word size). So writing to handle -1 is what I use to write error messages to the screen. - Detecting if GEMDOS handle 1 is redirected can be done by using the GEMDOS FSeek function (trap #1, function $42). When asking for the current position FSeek always returns 0 when handle 1 is used for the screen. Otherwise it returns a number greater than 0. Here follow ARXX.DOC and the output from 'arxx -tv gemlib' -------------------ARXX.DOC---------------------------------------------------- NAME arxx - an object library maintainer, replacement for ar68 SYNOPSIS arxx -trdwx[v] [-ab opmod] lib mod1 mod2 .... [>file] DESCRIPTION With arxx you can create and maintain object libraries to be used with LINK68. It has been written as a replacement for ar68, which did not function satisfactorily. In the command specify only one of the trdwx options. With the r option only one of the ab options may be specified. For details see below. 1. Listing the contents of the library: arxx -t[v] lib [>listfile] The t option will give you a list of the names and sizes of the object modules in the library on the standard output. When the v option is specified the global symbols for each module are also listed. Global symbols in the data segment are preceded by an '*'and external global symbols (common data, C external variables) are preceded by a '%'. 2. Replacing modules in the library: arxx -r[v] lib mod1 mod2 .... modn [>listfile] The library is scanned once and the modules are replaced in the order specified on the command line. When a module is not found in the library it is added at the end. It is possible to get the same module more than once in the library by specifying the wrong order. This is also the command to create a new library. With the v option the modules copied and replaced are listed on the standard output. 3. Inserting modules in the library: arxx -r[v] -ab opmod lib mod1 mod2 .... modn [>listfile] When you want to insert modules in the library use the a (after) or b (before) option (Only one allowed). This option has to be followed by the name of the library module after or before which the new modules have to be inserted. 3. Deleting modules from the library. arxx -d[v] lib mod1 mod2 ... modn [>listfile] Deletes the modules from the library. The modules have to be specified in library order because the library is only scanned once. 4. Extracting modules from the library. arxx -x[v] lib mod1 mod2 ... modn [>listfile] The library is searched only once to extract the modules specified on the command line. The object files are created in the default directory with the same names as in the library. If you want an other name and/or directory use the w option. 5. Writing modules from the library to an other directory/file. arxx -w[v] lib mod >newfile This works the same as the x option, but only one module may be extracted. This module is written to the standard output which has to be redirected to the diskfile of your choice. REMARKS Output redirection (necessary for -w, optional for the others)) has to be performed by the command interpreter. When using arxx as a TTP application from the desktop you are out of luck. When no v option is specified arxx performs it work silently (except for the t option). With the v option all actions (copying, adding, extracting, writing, deleting modules) are listed on the standard output. ------------------------------------------------------------------------------- Here follows as an example the output of 'arxx -tv gemlib' ------------------------------------------------------------------------------- channel5.o 1356 %__fds _maxfile *__chvec __allocc __freec __chinit ___chini __chkc xmainnw.o 2632 ___main _nowildc mallocdb.o 912 __errmal _malloc_ noascii.o 340 _noascii *___noasc __rdasc __wrtasc nobinary.o 344 _nobinar *___nobin __rdbin __wrtbin nodisk.o 492 _nodisk *___nodis __rdasc __rdbin __wrtasc __wrtbin nofilesz.o 152 _nofiles __filesz nofloat.o 496 _nofloat *___noflo __petoa __pftoa __pgtoa __atof nolong.o 260 _nolong *___nolon ___prtld nottyin.o 240 _nottyin __ttyin access.o 576 _access _chmod _chown atoi.o 500 _atoi atol.o 548 _atol calloc.o 476 _zalloc _calloc exec.o 588 _execl fdopen.o 660 _fdopen fgets.o 392 _fgets fopen.o 1432 __fopen _fopen _fopena _fopenb fputs.o 324 _fputs fread.o 492 _fread freopen.o 1408 __freope _freopen _freopa _freopb fseek.o 476 _fseek _rewind ftell.o 880 _ftell fwrite.o 468 _fwrite getl.o 280 _getl getpass.o 1224 _getpass gets.o 356 _gets getw.o 240 _getw main.o 404 __main mktemp.o 536 _mktemp getpid.o 96 _getpid optoff.o 516 __optoff perror.o 2456 *_sys_ner _perror *_sys_err printf.o 344 _printf _fprintf putl.o 356 _putl puts.o 320 _puts putw.o 356 _putw qsort.o 1316 _qsort rand.o 660 _rand _srand readl.o 428 _readl rename.o 400 _rename strrchr.o 492 _strrchr _rindex scanf.o 344 _scanf _fscanf setbuf.o 288 _setbuf sgtty.o 584 _stty _gtty sscanf.o 420 _sscanf doscan.o 5572 __doscan fgetc.o 252 _fgetc filbuf.o 844 __filbuf read.o 634 _read readasc.o 1140 __rdasc __cr_col readbin.o 444 __rdbin swab.o 292 _swab ttyin.o 976 __ttyin ttyinraw.o 716 __ttyinr _ttyinra ungetc.o 304 _ungetc unlink.o 336 _unlink writel.o 428 _writel xmain.o 3184 ___main creat.o 1088 __creat _creat _creata _creatb exit.o 160 _exit cleanup.o 268 __cleanu fclose.o 344 _fclose close.o 596 _close fdecls.o 548 *__iob ___fdecl fflush.o 560 _fflush open.o 1272 __open _open _opena _openb lseek.o 508 _lseek _tell filesz.o 392 __filesz sprintf.o 372 _sprintf doprt.o 4300 __doprt doprtfp.o 820 __pftoa __petoa __pgtoa fputn.o 464 _fputn fputc.o 296 _fputc flsbuf.o 1060 __flsbuf isatty.o 584 _isatty _isdev _ttyname malloc.o 2704 *__afreeb *__aflist _malloc _free _realloc mallocnd.o 144 _malloc_ __errmal prtint.o 496 ___prtin prtld.o 856 ___prtld prtshort.o 500 ___prtsh sbrk.o 464 _sbrk write.o 548 _write channels.o 1300 %__fds *__chvec __allocc __freec __chinit ___chini __chkc writeasc.o 968 __wrtasc writebin.o 468 __wrtbin blkio.o 524 __blkio osattr.o 180 *_os_abil *_os_vers _osattr wrtchr.o 1284 __wrtchr lstout.o 320 __lstout ttyout.o 576 __ttyout xopen.o 956 ___open chkuser.o 208 __chkuse __uchkus errno.o 80 *_errno *__errcpm strchr.o 404 _strchr _index parsefn.o 420 __parsef blkfill.o 240 _blkfill blkmove.o 448 _blkmove strcat.o 296 _strcat strcmp.o 344 _strcmp strncat.o 360 _strncat strncmp.o 328 _strncmp strncpy.o 384 _strncpy strcpy.o 224 _strcpy strlen.o 232 _strlen ctype.o 356 *___atab ____atab xstrcmp.o 496 __strcmp yesfloat.o 88 _nofloat yesstart.o 88 _nostart xatof.o 136 __atof abort.o 88 _abort aldiv.o 192 _aldiv aldiv almul.o 108 almul alrem.o 204 %_ldivr _alrem alrem ldiv.o 652 %_ldivr _ldiv ldiv lrem.o 188 %_ldivr _lrem lrem salloc.o 176 __salloc setjmp.o 136 _setjmp _longjmp uldiv.o 552 *_uldivr _uldiv signal.o 1272 _signal __setvec xsignal.o 308 __illins __trace __trap __buserr __arith blivot.o 280 _sw_ pcr.o 574 __pc_rea __pc_wri rta.o 88 _trap lmul.o 336 lmul ------------------------------------------------------------------------------- Ton van Overbeek European Space Research and Technology Centre (ESTEC) Control Systems Section P.O.Box 299 2200 AG Noordwijk, The Netherlands. Phone: +31 1719 83041 Email: TPC862%ESTEC.BITNET@WISCVM.WISC.EDU (ARPA) ...!ucbvax!tpc862@estec.bitnet (USENET/UUCP) TPC862@ESTEC (EARN/BITNET)