OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2007-04-04 Chen Liqin <liqin@sunnorth.com.cn>
[pf3gnuchains/gcc-fork.git]
/
libiberty
/
spaces.c
diff --git
a/libiberty/spaces.c
b/libiberty/spaces.c
index
ea92571
..
67481c9
100644
(file)
--- a/
libiberty/spaces.c
+++ b/
libiberty/spaces.c
@@
-14,29
+14,24
@@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
-Boston, MA 0211
1-1307
, USA. */
+not, write to the Free Software Foundation, Inc., 5
1 Franklin Street - Fifth Floor
,
+Boston, MA 0211
0-1301
, USA. */
/*
/*
-NAME
+@deftypefn Extension char* spaces (int @var{count})
- spaces -- return a pointer to a buffer full of spaces
+Returns a pointer to a memory region filled with the specified
+number of spaces and null terminated. The returned pointer is
+valid until at least the next call.
-SYNOPSIS
-
- char *spaces (int count)
-
-DESCRIPTION
-
- Returns a pointer to a memory region filled with the specified
- number of spaces and null terminated. The returned pointer is
- valid until at least the next call.
-
-BUGS
+@end deftypefn
*/
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
#include "ansidecl.h"
#include "libiberty.h"
@@
-45,13
+40,12
@@
BUGS
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
-extern PTR malloc
PARAMS ((size_t)
);
-extern void free
PARAMS ((PTR)
);
+extern PTR malloc
(size_t
);
+extern void free
(PTR
);
#endif
const char *
#endif
const char *
-spaces (count)
- int count;
+spaces (int count)
{
register char *t;
static char *buf;
{
register char *t;
static char *buf;
@@
-63,7
+57,7
@@
spaces (count)
{
free (buf);
}
{
free (buf);
}
- buf = malloc (count + 1);
+ buf =
(char *)
malloc (count + 1);
if (buf == (char *) 0)
return 0;
for (t = buf + count ; t != buf ; )
if (buf == (char *) 0)
return 0;
for (t = buf + count ; t != buf ; )