# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/IPViewMessage.pl 1.4 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2000,2002 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # #!/usr/bin/perl -T # @(#)06 1.4 src/bos/usr/sbin/snappd/scripts/IPViewMessage.pl, snapp, bos720 5/31/02 07:50:47 #--------------------------------------------------------------------------- #--------Display a Message page for Snapp Program -------------------- #--------------------------------------------------------------------------- #--------This page is displays a message that is located in the ------------ #--------message file (previously saved from a DoSet??.pl page) ------------ #--------Also reformats that page because newlines and spaces had----------- #--------been removed earlier ------------ #--------------------------------------------------------------------------- #--------Links to Pages: IPDoneSetTokenRing.pl or IPDoneSetEthernet.pl------ #--------------------------------------------------------------------------- $ENV{'PATH'} = '/bin:/usr/bin'; open(ENFILE, "/var/snapp/snapp.message"); $strToDisplay = ; close(ENFILE); open(ENFILE, "/var/snapp/snapp.markers"); $intCounter = ; close(ENFILE); @strDisplay = (split ",", $strToDisplay); if(@strDisplay < 8) { $intCounter = 0; $intEndCounter = @strDisplay; } else { if(@ARGV[0] == 1) { if($intCounter - 16 > 0) { $intCounter=-16; } else { $intCounter = 0; } } if(@strDisplay > $intCounter + 8) { $intEndCounter = $intCounter + 8; } else { if($intCounter > @strDisplay - 8) { $intCounter = @strDisplay - 8; } else { $intCounter = 0; } $intEndCounter = @strDisplay; } } $strToTheLabel = ""; while($intEndCounter > $intCounter) { $strToTheLabel = join "", $strToTheLabel, @strDisplay[$intCounter], "\n"; if($temp = length(@strDisplay[$intCounter]) > 25) { while($temp > 25) { $intEndCounter--; $temp =- 25; } } $intCounter++; } open(OUTFILE,">/var/snapp/snapp.markers"); print OUTFILE $intEndCounter; close (OUTFILE); open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Display Results 5 30 150 95 2 28 95 156 2 50 15 130 55 50 55 30 EOXML close(OUTFILE); system("/usr/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");