chiark
/
gitweb
/
~mdw
/
misc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
71fbd12
)
space.c: Strip `typedef' from `buf'; now it's just a struct.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 13 Nov 2012 23:39:45 +0000
(23:39 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 14 Nov 2012 00:02:48 +0000
(
00:02
+0000)
space.c
patch
|
blob
|
blame
|
history
diff --git
a/space.c
b/space.c
index 5a6a0de119949e5cd719b25b70cbc3f0f0974073..73fb3a770b492c85c9a91d01661fc61e4404e548 100644
(file)
--- a/
space.c
+++ b/
space.c
@@
-95,16
+95,16
@@
fail_0:
return (0);
}
return (0);
}
-
typedef
struct buf {
+struct buf {
char *b;
size_t n;
size_t sz;
char *b;
size_t n;
size_t sz;
-}
buf
;
+};
#define BUF_INIT { 0, 0, 0 }
#define BUF_INIT { 0, 0, 0 }
-static void reset(buf *b) { b->n = 0; }
+static void reset(
struct
buf *b) { b->n = 0; }
-static int put(buf *b, int ch)
+static int put(
struct
buf *b, int ch)
{
size_t w;
{
size_t w;
@@
-130,7
+130,7
@@
static int put(buf *b, int ch)
static int space(const char *name)
{
static int space(const char *name)
{
- static buf b = BUF_INIT;
+ static
struct
buf b = BUF_INIT;
FILE *fin, *fout = stdout;
char *newname = 0, *oldname = 0;
int rc = TROUBLE, status = OK;
FILE *fin, *fout = stdout;
char *newname = 0, *oldname = 0;
int rc = TROUBLE, status = OK;