Changeset 79597c7 in rtems


Ignore:
Timestamp:
Feb 27, 1998, 6:18:47 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
607e0a25
Parents:
0799dec
Message:

Removed use of dc. David Fiddes reported that this is part of the
GNU tool bc which is not always installed under Linux and seldom
present under non-UNIX environments like Win32.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/tools/generic/size_rtems.in

    r0799dec r79597c7  
    202202}
    203203
     204# adds the numbers passed on the command line
     205addit()
     206{
     207  sumx=0
     208  for x in $*
     209  do
     210    sumx=`expr $sumx + $x`
     211  done
     212  echo $sumx
     213}
     214
    204215# adds a column from the output of sizedir
    205216addsizes()
    206217{
    207   cut -d' ' -f${1} | sed -e '2,$s/$/ + /' -e '$,$s/$/ p/' | dc
     218  # dc version is not portable enough -- It can be left out during
     219  #  installing linux and may not be available on non-UNIX hosts.
     220  #cut -d' ' -f${2} ${1} | sed -e '2,$s/$/ + /' -e '$,$s/$/ p/' | dc
     221 
     222  #  This may not be as fast but it is probably more portable.
     223  addit `cut -d' ' -f${2} ${1}`
    208224}
    209225
  • tools/cpu/generic/size_rtems.in

    r0799dec r79597c7  
    202202}
    203203
     204# adds the numbers passed on the command line
     205addit()
     206{
     207  sumx=0
     208  for x in $*
     209  do
     210    sumx=`expr $sumx + $x`
     211  done
     212  echo $sumx
     213}
     214
    204215# adds a column from the output of sizedir
    205216addsizes()
    206217{
    207   cut -d' ' -f${1} | sed -e '2,$s/$/ + /' -e '$,$s/$/ p/' | dc
     218  # dc version is not portable enough -- It can be left out during
     219  #  installing linux and may not be available on non-UNIX hosts.
     220  #cut -d' ' -f${2} ${1} | sed -e '2,$s/$/ + /' -e '$,$s/$/ p/' | dc
     221 
     222  #  This may not be as fast but it is probably more portable.
     223  addit `cut -d' ' -f${2} ${1}`
    208224}
    209225
Note: See TracChangeset for help on using the changeset viewer.