4 REM Fix object files output by partial AOF linking
6 REM © 1995-1998 Straylight
9 REM ----- Licensing note ----------------------------------------------------
11 REM This file is part of Straylight's core utilities (coreutils)
13 REM Coreutils is free software; you can redistribute it and/or modify
14 REM it under the terms of the GNU General Public License as published by
15 REM the Free Software Foundation; either version 2, or (at your option)
18 REM Coreutils is distributed in the hope that it will be useful,
19 REM but WITHOUT ANY WARRANTY; without even the implied warranty of
20 REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 REM GNU General Public License for more details.
23 REM You should have received a copy of the GNU General Public License
24 REM along with Coreutils. If not, write to the Free Software Foundation,
25 REM 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 SYS "OS_GetEnv" TO comm$
28 IF INSTR(comm$,"-quit")=0 THEN ERROR 1,"fixLink must be started using *Run"
29 comm$=MID$(comm$,INSTR(comm$,"""")+1)
30 comm$=MID$(comm$,INSTR(comm$," ")+1)
31 comm$=LEFT$(comm$,INSTR(comm$,"""")-1)
33 SYS "OS_File",17,comm$ TO ,,,,size%
35 SYS "OS_File",16,comm$,b%,0
37 REM --- Find header ---
47 IF x%!0=A% AND x%!4=B% THEN o%=x%!8
50 IF o%=0 THEN ERROR 0,"Erk!"
52 REM --- Now munge attributes ---
61 REM --- Save AOF file back ---
63 SYS "OS_File",10,comm$,&FFD,,b%,b%+size%