Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f60044f5
Commit
f60044f5
authored
May 16, 1994
by
Richard M. Stallman
Browse files
*** empty log message ***
parent
8eefe2b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
lwlib/lwlib.c
lwlib/lwlib.c
+27
-16
No files found.
lwlib/lwlib.c
View file @
f60044f5
...
...
@@ -28,18 +28,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "lwlib-utils.h"
#include <X11/StringDefs.h>
#if defined(__GNUC__) && !defined(alloca)
#define alloca __builtin_alloca
#endif
#if ((!__GNUC__) && !defined(__hpux)) && !defined(_AIX)
#include <alloca.h>
#endif
#if defined(_AIX)
#pragma alloca
#endif
#if defined (USE_LUCID)
#include "lwlib-Xlw.h"
#endif
...
...
@@ -73,6 +61,27 @@ all_widget_info = NULL;
static
void
instanciate_widget_instance
(
/* widget_instance* instance */
);
lwlib_memset
(
address
,
value
,
length
)
char
*
address
;
int
value
;
int
length
;
{
int
i
;
for
(
i
=
0
;
i
<
length
;
i
++
)
address
[
i
]
=
value
;
}
lwlib_bcopy
(
from
,
to
,
length
)
char
*
from
;
char
*
to
;
int
length
;
{
int
i
;
for
(
i
=
0
;
i
<
length
;
i
++
)
to
[
i
]
=
from
[
i
];
}
/* utility functions for widget_instance and widget_info */
char
*
safe_strdup
(
s
)
...
...
@@ -133,7 +142,7 @@ malloc_widget_value ()
wv
=
(
widget_value
*
)
malloc
(
sizeof
(
widget_value
));
malloc_cpt
++
;
}
memset
(
wv
,
0
,
sizeof
(
widget_value
));
lwlib_
memset
(
wv
,
0
,
sizeof
(
widget_value
));
return
wv
;
}
...
...
@@ -255,7 +264,7 @@ free_widget_info (info)
safe_free_str
(
info
->
type
);
safe_free_str
(
info
->
name
);
free_widget_value_tree
(
info
->
val
);
memset
((
void
*
)
info
,
0xDEADBEEF
,
sizeof
(
widget_info
));
lwlib_
memset
((
void
*
)
info
,
0xDEADBEEF
,
sizeof
(
widget_info
));
free
(
info
);
}
...
...
@@ -297,7 +306,7 @@ static void
free_widget_instance
(
instance
)
widget_instance
*
instance
;
{
memset
((
void
*
)
instance
,
0xDEADBEEF
,
sizeof
(
widget_instance
));
lwlib_
memset
((
void
*
)
instance
,
0xDEADBEEF
,
sizeof
(
widget_instance
));
free
(
instance
);
}
...
...
@@ -555,11 +564,13 @@ name_to_widget (instance, name)
else
{
int
length
=
strlen
(
name
)
+
2
;
char
*
real_name
=
(
char
*
)
alloc
a
(
length
);
char
*
real_name
=
(
char
*
)
xm
alloc
(
length
);
real_name
[
0
]
=
'*'
;
strcpy
(
real_name
+
1
,
name
);
widget
=
XtNameToWidget
(
instance
->
widget
,
real_name
);
free
(
real_name
);
}
return
widget
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment