[comp.binaries.amiga] increv

ain@j.cc.purdue.edu (Patrick White) (08/02/88)

Submitted by:	SLMYQ@USU.BITNET (Bryan Ford)
Summary:	generates/increments an object file with a revision number in it.
Poster Boy:	Patrick White	(ain@j.cc.purdue.edu)
Archive Name:	binaries/amiga/volume8/increv.sh.Z
Tested.
 
NOTES:
   This works with Manx 3.4a.
 
 
-- Pat White   (co-moderator comp.sources/binaries.amiga)
ARPA/UUCP: j.cc.purdue.edu!ain  BITNET: PATWHITE@PURCCVM  PHONE: (317) 743-8421
U.S.  Mail:  320 Brown St. apt. 406,    West Lafayette, IN 47906
[archives at: j.cc.purdue.edu.ARPA]
 
========================================
 
#       This is a shell archive.
#       Remove everything above and including the cut line.
#       Then run the rest of the file through sh.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar:    Shell Archiver
#       Run the following text with /bin/sh to create:
#       IncRev.doc
#       IncRev.uu
# This archive created: Sat Mar 12 09:24:57 1988
echo shar: extracting IncRev.doc
sed 's/^XX//' << \SHAR_EOF > IncRev.doc
XX
XX                                   IncRev
XX                            Revision Incrementor
XX                               by Bryan Ford
XX
XX    IncRev is a very small and simple program I wrote in order to allow me
XXto automatically increment the revision number of a program every time I
XXrecompiled.  It creates its own object module, Rev.o, which contains a
XXglobal symbol called Revision, which is a longword variable.  You can get
XXaccess to this variable in C by inserting "extern long Revision;" in your
XXcode.  This variable will always contain the current revision number.
XX    I defined Revision as a long for two reasons.  First, since AmigaDOS
XXonly does things on longword boundaries anyway, there's no reason not to.
XXAnd second, just in case you're recompiling more than 32767 times.
XX    IncRev takes no parameters.  If Rev.o exists, it increments its
XXrevision number.  If it doesn't it creates it and resets the revision
XXnumber.  You'll need to include Rev.o in your linking list and make sure
XXit's run before you link your program.  If you use makefiles like me, you
XXcan just insert the command before the linking command.
XX    This program is being distributed as Freeware, which means you can copy
XXand distribute this program as much as you like, as long as you keep it in
XXits original form, including this document, and no fee is charged for
XXcopying.  No donation is required, since this is such a small program.  I
XXmay be reached at the address below for comments, questions, and flames.
XX
XX                                    Bryan Ford
XX                            Snail:  1790 East 1400 North
XX                                    Logan, UT 84321
XX                            Phone:  (801)753-1159
XX                            Bitnet: FATQW@USU
XX
SHAR_EOF
if test 1752 -ne "`wc -c IncRev.doc`"
then
echo shar: error transmitting IncRev.doc '(should have been 1752 characters)'
fi
echo shar: extracting IncRev.uu
sed 's/^XX//' << \SHAR_EOF > IncRev.uu
XX
XXbegin 644 IncRev
XXM```#\P`````````$``````````,````"````N`````$```#P```#Z0````).D
XXM^0```````````^P````!`````P````(````````#\@```^H```"X`"$``0``J
XXM`````````````/_______________P``````````````````````````````T
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM``````````````````````````/G`````````^H````!`````````^\!```#.
XXM7U)E=FES:6]N``````````````````/R```#\@``````````````````````8
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````````````````````````````````````````````
XXM`````````````````````%)E=BYO`$-A;B=T(')E860@97AI<W1I;F<@9FEL9
XXM90H`0V%N)W0@;W!E;B!O=71P=70@9FEL90H`0V%N)W0@=W)I=&4@;W5T<'5T2
XXM(&9I;&4*`````````_(```/K`````0```_(```/I````\"//````'"/`````P
XXM)"/(````*"QY````!"/.````!)/)3J[^VBA`2JP`K&<``/9A``&,D<@@+`"LK
XXMY8@@,`@0Y8A(YP`P1?D```"L1_D````L($!P`!`80C`(`";((#D````D('D`M
XXM```H0_`(``PA`"!2R/_Z0BD``1(89UP,`0`@9_8,`0`)9_`FR@P!`")G%!3!"
XXM$AAG0@P!`"!G!!3!8/)"&F#4$AAG,`P!`")G\@P!`"IF(!(8#`$`3F<&#`$`G
XXM;F8$<@I@#@P!`$5G!@P!`&5F`G(;%,%@S$(20I,@/````"B0BT:`Y(A,WPP`:
XXM2'D````L+P!.N0```WPCP````!!.N0```XPCP````!0CP````!A.N0```D)P8
XXM`"YY````'$YU80``F&$``((CP````"`O`$*G)$`@*@`D9Q`L>0````@@0"(H=
XXM``!.KO^"3KD```)"<`!@!"`O``0N>0```!PO`"QY````!"`Y````"&<&(D!.(
XXMKOYB2KD````@9PY.KO]\(GD````@3J[^AB`?3G5(YP$&+CP``X`'+'@`!$ZNH
XXM_Y1,WV"`<&1@L$'L`%Q.KOZ`0>P`7$ZN_HQ.=4/Z`!)P`$ZN_=@CP`````AGY
XXMPDYU9&]S+FQI8G)A<GD`3E8``$JY`````&<.+SD`````3KD```,P6(]*K@`(3
XXM9SA*N0```!AG(B\N``A.N0```YQ8CR\`+RX`""\Y````&$ZY```#8$_O``QPM
XXM"B\`3KD```%66(]@"D*G3KD```%66(].7DYU3E8``"\\```#[4AY```"C$ZY:
XXM```#%%"/(\``````2H!G/G(X+P%(>0```:PO`$ZY```#1$_O``P,@````#AG"
XXM#$AY```"DF$`_U)8CR\Y`````$ZY```#,%B/0KD`````4KD```&\+SP```/NB
XXM2'D```*,3KD```,44(\CP`````!*@&8,2'D```*L80#_#EB/<#@O`$AY```!(
XXMK"\Y`````$ZY```#8$_O``P,@````#AG#$AY```"Q&$`_N!8CR\Y`````$ZY;
XXM```#,%B/3EY.=0``2.<@`BQY````"$SO``8`#$ZN_^),WT`$3G4``"\.+'D`%
XXM```((B\`"$ZN_]PL7TYU2.<P`BQY````"$SO``X`$$ZN_]9,WT`,3G4``$CGG
XXM,`(L>0````A,[P`.`!!.KO_03-]`#$YU```O#BQY````"$ZN_\HL7TYU+PXLC
XXM>0````A.KO_$+%].=4Y6__Q"KO_\(&X`"-'N__P0$$H`9P92KO_\8.P@+O_\/
XXM3EY.=0```^P````E`````0```Y````.````#9@```TH```,T```#&@```A@`^
XXM``'^```"]@```M@```+(```"L````J0```*$```":@```DX```'(```!A```#
XXM`7@```%J```!7````3X```$L```!'````0X```$(````_````.X```#>````J
XXM9````%X```!,````1@```!H````.````"`````(````(`````@```P(```+>U
XXM```"O@```IX```*0```"7````>H```'B````#P````,```)R```"M@```E0`R
XXM``(X```"+````N0```(>```""@```P@```*6```!\````/8```$"```!3@``6
XXM`10````````#\`````)?3W5T<'5T(@```XP````"7TEN<'5T(@````-\````]
XXM`E]7<FET92(````#8`````)?4F5A9"(``````T0````"7T-L;W-E(@````,PC
XX8`````E]/<&5N(@`````#%`````````/RA
XX``
XXend
XXsize 2184
SHAR_EOF
if test 3094 -ne "`wc -c IncRev.uu`"
then
echo shar: error transmitting IncRev.uu '(should have been 3094 characters)'
fi
#       End of shell archive
exit 0