PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/cdex1/tags/initial/cdex_xp/scsilib/error.c

#
C | 49 lines | 24 code | 3 blank | 22 comment | 0 complexity | 789b110191703f965e5b8c99787b44de MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, LGPL-2.0, BSD-3-Clause, AGPL-1.0, CC-BY-SA-3.0, GPL-3.0
  1. /* @(#)error.c 1.12 00/05/07 Copyright 1985 J. Schilling */
  2. /*
  3. * fprintf() on standard error stdio stream
  4. *
  5. * Copyright (c) 1985 J. Schilling
  6. */
  7. /*
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2, or (at your option)
  11. * any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; see the file COPYING. If not, write to
  20. * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <mconfig.h>
  23. #include <stdio.h>
  24. #include <standard.h>
  25. #include <vadefs.h>
  26. #include <schily.h>
  27. /* VARARGS1 */
  28. #ifdef PROTOTYPES
  29. int error(const char *fmt, ...)
  30. #else
  31. int error(fmt, va_alist)
  32. char *fmt;
  33. va_dcl
  34. #endif
  35. {
  36. va_list args;
  37. int ret;
  38. #ifdef PROTOTYPES
  39. va_start(args, fmt);
  40. #else
  41. va_start(args);
  42. #endif
  43. ret = js_fprintf(stderr, "%r", fmt, args);
  44. va_end(args);
  45. return (ret);
  46. }