OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [newlib/] [libc/] [stdio/] [fscanf.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
 * Copyright (c) 1990 The Regents of the University of California.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms are permitted
6
 * provided that the above copyright notice and this paragraph are
7
 * duplicated in all such forms and that any documentation,
8
 * advertising materials, and other materials related to such
9
 * distribution and use acknowledge that the software was developed
10
 * by the University of California, Berkeley.  The name of the
11
 * University may not be used to endorse or promote products derived
12
 * from this software without specific prior written permission.
13
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16
 */
17
 
18
#include <_ansi.h>
19
#include <stdio.h>
20
 
21
#ifdef _HAVE_STDC
22
 
23
#include <stdarg.h>
24
 
25
extern int __svfscanf ();
26
 
27
int
28
fscanf (FILE * fp, const char *fmt, ...)
29
{
30
  int ret;
31
  va_list ap;
32
 
33
  va_start (ap, fmt);
34
  ret = __svfscanf (fp, fmt, ap);
35
  va_end (ap);
36
  return ret;
37
}
38
 
39
#else
40
 
41
#include <varargs.h>
42
 
43
extern int __svfscanf ();
44
 
45
int
46
fscanf (fp, fmt, va_alist)
47
     FILE *fp;
48
     char *fmt;
49
     va_dcl
50
{
51
  int ret;
52
  va_list ap;
53
 
54
  va_start (ap);
55
  ret = __svfscanf (fp, fmt, ap);
56
  va_end (ap);
57
  return ret;
58
}
59
 
60
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.