_fprintf.c 664 B

1234567891011121314151617181920212223242526
  1. /*
  2. Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. #include <stdio.h>
  9. #include <stdarg.h>
  10. /* for Info and similar macroes. fprintf is already a macro and fprintf x
  11. * fools the preprocessor
  12. */
  13. int _fprintf(FILE* fp, const char* fmt, ...)
  14. {
  15. va_list ap;
  16. long n;
  17. va_start(ap, fmt);
  18. n = vfprintf(fp, fmt, (long*) ap);
  19. va_end(ap);
  20. return n;
  21. }