about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTStyle.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2003-04-28 01:28:08 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2003-04-28 01:28:08 -0400
commit03413d1c868839950b21fd0b10fa5f31fff83964 (patch)
tree69b5d38bd1d80a009b23a41cd40148e434e13e38 /WWW/Library/Implementation/HTStyle.c
parentc812b42f4248ea1ab6641616f6aef08d402d9f92 (diff)
downloadlynx-snapshots-03413d1c868839950b21fd0b10fa5f31fff83964.tar.gz
snapshot of project "lynx", label v2-8-5dev_15
Diffstat (limited to 'WWW/Library/Implementation/HTStyle.c')
-rw-r--r--WWW/Library/Implementation/HTStyle.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/WWW/Library/Implementation/HTStyle.c b/WWW/Library/Implementation/HTStyle.c
index 2e8494d2..9e3bc8a5 100644
--- a/WWW/Library/Implementation/HTStyle.c
+++ b/WWW/Library/Implementation/HTStyle.c
@@ -18,10 +18,9 @@
 */
 PUBLIC HTStyle* HTStyleNew NOARGS
 {
-    HTStyle * self = (HTStyle *)malloc(sizeof(*self));
+    HTStyle * self = typecalloc(HTStyle);
     if (self == NULL)
 	outofmem(__FILE__, "HTStyleNew");
-    memset((void *)self, 0, sizeof(*self));
     return self;
 }
 
@@ -31,6 +30,7 @@ PUBLIC HTStyle* HTStyleNewNamed ARGS1 (CONST char *,name)
 {
     HTStyle * self = HTStyleNew();
     StrAllocCopy(self->name, name);
+    self->id = -1; /* <0 */
     return self;
 }
 
@@ -287,15 +287,9 @@ HTStyleSheet * HTStyleSheetRemoveStyle ARGS2
 
 HTStyleSheet * HTStyleSheetNew NOARGS
 {
-    HTStyleSheet * self = (HTStyleSheet *)malloc(sizeof(*self));
+    HTStyleSheet * self = typecalloc(HTStyleSheet);
     if (self == NULL)
 	outofmem(__FILE__, "HTStyleSheetNew");
-
-    memset((void*)self, 0, sizeof(*self));	/* ANSI */
-/* Harbison c ref man says (char*)self
-   but k&r ansii and abc books and Think_C say (void*) */
-
-/*    bzero(self, sizeof(*self)); */		/* BSD */
     return self;
 }