[Frugalware-git] firepl: change dsb initializer again

James Buren ryuo at frugalware.org
Mon May 7 08:55:13 CEST 2012


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=firepl.git;a=commitdiff;h=b035f6467dfd45b38428784463989e5748b07c72

commit b035f6467dfd45b38428784463989e5748b07c72
Author: James Buren <ryuo at frugalware.org>
Date:   Mon May 7 01:54:39 2012 -0500

change dsb initializer again

diff --git a/dsb.c b/dsb.c
index 720b6e7..91d44dc 100644
--- a/dsb.c
+++ b/dsb.c
@@ -30,7 +30,7 @@ static inline void dsb_putc(dsb *self,char c)
++self->len;
}

-extern dsb *dsb_open(const char *str)
+extern dsb *dsb_open(void)
{
dsb *self;

@@ -42,10 +42,7 @@ extern dsb *dsb_open(const char *str)

self->size = DSB_DEFAULT_SIZE;

-	if(str)
-		dsb_puts(self,str,(void *) 0);
-	else
-		dsb_putc(self,0);
+	dsb_putc(self,0);

return self;
}
diff --git a/dsb.h b/dsb.h
index ab48dbd..12194c4 100644
--- a/dsb.h
+++ b/dsb.h
@@ -5,7 +5,7 @@

typedef struct _dsb dsb;

-extern dsb *dsb_open(const char *str);
+extern dsb *dsb_open(void);
extern char *dsb_close(dsb *self,bool save);
extern void dsb_puts(dsb *self,...) __attribute__((__sentinel__));
extern const char *dsb_gets(const dsb *self);


More information about the Frugalware-git mailing list