home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 283 / Shell5SourceCode.sis / contrast (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  1998-08-30  |  1.4 KB  |  45 lines

  1.  
  2.  
  3. Rem   Contrast, an addon command for Shell5
  4. Rem   Set the screen contrast
  5. Rem
  6. Rem   Copyright (C) 1998  Nick Murray
  7. Rem
  8. Rem   This program is free software; you can redistribute it and/or
  9. Rem   modify it under the terms of the GNU General Public License
  10. Rem   as published by the Free Software Foundation; either version 2
  11. Rem   of the License, or (at your option) any later version.
  12. Rem
  13. Rem   This program is distributed in the hope that it will be useful,
  14. Rem   but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. Rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. Rem   See the GNU General Public License for more details.
  17. Rem
  18. Rem   You should have received a copy of the GNU General Public License
  19. Rem   along with this program; if not, write to the Free Software Foundation,
  20. Rem   Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  21. Rem
  22. INCLUDE "System.oxh"
  23. PROC contrast%:(n%)
  24. LOCAL Max%,Lev%
  25.     ONERR ErrTrap::
  26.     Max%=MAXDISPLAYCONTRAST&:
  27.     IF n%<>2
  28. Usage::
  29.         PRINT "Usage: contrast <0-";Max%;">"
  30.     ELSE
  31.         Lev%=VAL(PEEK$(argv&(2)))
  32.         IF Lev%>Max%
  33.             GOTO Usage::
  34.         ENDIF
  35.         SETDISPLAYCONTRAST:(Lev%)
  36.     ENDIF
  37.     RETURN
  38. ErrTrap::
  39.     ONERR off
  40.     PRINT err$:(ERR)
  41.     RETURN ERR
  42. ENDP
  43.  
  44.  
  45.