home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / SUPER_C.ZIP / BORDER.C < prev    next >
Encoding:
Text File  |  1980-01-01  |  956 b   |  36 lines

  1. /*                      Change Border Color
  2.  
  3.         This program changes the background color/attributes.
  4. */
  5.  
  6. /*      main(argc,argv)
  7.  
  8.         Function: Change the color of the border of the display to that
  9.         given as a command line parameter.
  10.  
  11.         Algorithm: Check the number of parameters. If there is one, then
  12.         convert it to a number using atoi, and pass that to the setPal
  13.         function to actually set the border color.
  14.  
  15.         Comments: This program will do nothing with a non-color display
  16.         adapter.
  17. */
  18.  
  19. main(argc,argv)
  20.  
  21. int argc;
  22. char *argv[];
  23.  
  24. {
  25.         /* Check for the right number of parameters. */
  26.         if (argc != 2) {
  27.                 /* If wrong, tell the user and exit. */
  28.                 puts("Usage: border <border color>");
  29.                 exit(1);
  30.         };
  31.  
  32.         /* Convert the parameter to a number and pass it to setPal. */
  33.         setPal(0,atoi(argv[1]));
  34. }
  35.  
  36.