home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / mov_poin.c < prev    next >
Text File  |  1989-02-08  |  724b  |  26 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*        MOV_POINTER(X,X,X,X)        */
  4. /*                    */
  5. /* Moves a file pointer to a desired    */
  6. /* location. The first argument is the  */
  7. /* file description. The second argument*/
  8. /* is the record number. The third argu-*/
  9. /* ment is the record length. The fourth*/
  10. /* argument is the number to add to the */
  11. /* product produced by the second and   */
  12. /* third arguments. (NOTE: The location */
  13. /* is referenced from the front of the  */
  14. /* file.)                */
  15. /*                    */
  16. /*--------------------------------------*/
  17. # include "stdio.h"
  18. void mov_pointer(fd,a,b,c)
  19. int a,b,c;
  20. FILE *fd;
  21. {
  22.         long h;
  23.         h=(long)(a*((long)b)+c);
  24.         fseek(fd,h,0);
  25. }
  26.