diff src/scrollbar.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents a145efe76779
children 12579d965149
line wrap: on
line diff
--- a/src/scrollbar.c	Mon Aug 13 09:54:24 2007 +0200
+++ b/src/scrollbar.c	Mon Aug 13 09:55:28 2007 +0200
@@ -168,9 +168,8 @@
 {
   struct device *d = XDEVICE (f->device);
   struct scrollbar_instance *instance =
-    (struct scrollbar_instance *) xmalloc (sizeof (*instance));
+    xnew_and_zero (struct scrollbar_instance);
 
-  memset (instance, 0, sizeof (*instance));
   MAYBE_DEVMETH (d, create_scrollbar_instance, (f, vertical, instance));
 
   return instance;
@@ -705,7 +704,7 @@
 }
 
 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /*
-Function called when the user gives the \"page-up\" scrollbar action.
+Function called when the user gives the "page-up" scrollbar action.
 (The way this is done can vary from scrollbar to scrollbar.) One argument,
 a cons containing the scrollbar's window and a value (#### document me!
 This value is nil for Motif/Lucid scrollbars and a number for Athena
@@ -746,7 +745,7 @@
 }
 
 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /*
-Function called when the user gives the \"page-down\" scrollbar action.
+Function called when the user gives the "page-down" scrollbar action.
 (The way this is done can vary from scrollbar to scrollbar.) One argument,
 a cons containing the scrollbar's window and a value (#### document me!
 This value is nil for Motif/Lucid scrollbars and a number for Athena
@@ -778,7 +777,7 @@
 }
 
 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /*
-Function called when the user invokes the \"to-top\" scrollbar action.
+Function called when the user invokes the "to-top" scrollbar action.
 The way this is done can vary from scrollbar to scrollbar, but
 C-button1 on the up-arrow is very common. One argument, the
 scrollbar's window.  You can advise this function to change the
@@ -795,7 +794,7 @@
 }
 
 DEFUN ("scrollbar-to-bottom", Fscrollbar_to_bottom, 1, 1, 0, /*
-Function called when the user invokes the \"to-bottom\" scrollbar action.
+Function called when the user invokes the "to-bottom" scrollbar action.
 The way this is done can vary from scrollbar to scrollbar, but
 C-button1 on the down-arrow is very common. One argument, the
 scrollbar's window.  You can advise this function to change the
@@ -885,7 +884,7 @@
   defsymbol (&Qscrollbar_to_top, "scrollbar-to-top");
   defsymbol (&Qscrollbar_to_bottom, "scrollbar-to-bottom");
   defsymbol (&Qscrollbar_vertical_drag, "scrollbar-vertical-drag");
-  
+
   defsymbol (&Qscrollbar_char_left, "scrollbar-char-left");
   defsymbol (&Qscrollbar_char_right, "scrollbar-char-right");
   defsymbol (&Qscrollbar_page_left, "scrollbar-page-left");