home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / b / bmh02src.zip / NEXT.C < prev    next >
C/C++ Source or Header  |  1992-08-16  |  581b  |  36 lines

  1. /*
  2.    next.c : Copyright Paul Healy, EI9GL, 1992.
  3.  
  4.    920712 : Created
  5. */
  6. #include <stdio.h>
  7. #include "rc.h"
  8. #include "help.h"
  9. #include "current.h"
  10.  
  11. #ifdef BMH
  12. #define main next_main
  13. #endif
  14.  
  15. int show_main(int argc, char *argv[]);
  16.  
  17. int
  18. main(int argc, char *argv[])
  19. {
  20.    int msg;
  21.    char *s, *arg[2], num[20];
  22.  
  23.    dohelp(argc, argv, "next [+folder]");
  24.  
  25.    if (loadconfig()==-1)
  26.       return -1;        
  27.  
  28.    if (getcurrent(argc, argv, &s, &msg) == -1)
  29.       return -1;
  30.  
  31.    sprintf(num, "%d", msg+1);
  32.    arg[1] = num;
  33.  
  34.    return show_main(2, arg);
  35. }
  36.