Third argument is now `const void *'.
1998-08-25 Martin Baulig <martin@home-of-linux.org> * include/glibtop/command.h (glibtop_call): Third argument is now `const void *'. * include/glibtop/xmalloc.h (glibtop_free): Now taking a `const void *'.
This commit is contained in:
committed by
Martin Baulig
parent
db3d7adbaa
commit
0ea8e591f4
@@ -1,5 +1,11 @@
|
|||||||
1998-08-25 Martin Baulig <martin@home-of-linux.org>
|
1998-08-25 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/command.h (glibtop_call): Third argument is
|
||||||
|
now `const void *'.
|
||||||
|
|
||||||
|
* include/glibtop/xmalloc.h (glibtop_free): Now taking a
|
||||||
|
`const void *'.
|
||||||
|
|
||||||
* src/daemon/ChangeLog: New file.
|
* src/daemon/ChangeLog: New file.
|
||||||
|
|
||||||
* sysdeps/sun4/ChangeLog: New file.
|
* sysdeps/sun4/ChangeLog: New file.
|
||||||
|
@@ -84,8 +84,8 @@ struct _glibtop_response
|
|||||||
|
|
||||||
#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
|
#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
|
||||||
|
|
||||||
extern void *glibtop_call_l __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
extern void *glibtop_call_l __P((glibtop *, unsigned, size_t, const void *, size_t, void *));
|
||||||
extern void *glibtop_call_s __P((glibtop *, unsigned, size_t, void *, size_t, void *));
|
extern void *glibtop_call_s __P((glibtop *, unsigned, size_t, const void *, size_t, void *));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ extern void *glibtop_malloc_r __P((glibtop *, size_t));
|
|||||||
extern void *glibtop_calloc_r __P((glibtop *, size_t, size_t));
|
extern void *glibtop_calloc_r __P((glibtop *, size_t, size_t));
|
||||||
extern void *glibtop_realloc_r __P((glibtop *, void *, size_t));
|
extern void *glibtop_realloc_r __P((glibtop *, void *, size_t));
|
||||||
extern char *glibtop_strdup_r __P((glibtop *, const char *));
|
extern char *glibtop_strdup_r __P((glibtop *, const char *));
|
||||||
extern void glibtop_free_r __P((glibtop *, void *));
|
extern void glibtop_free_r __P((glibtop *, const void *));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
|
glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
|
||||||
void *send_buf, size_t recv_size, void *recv_buf)
|
const void *send_buf, size_t recv_size, void *recv_buf)
|
||||||
{
|
{
|
||||||
glibtop_command cmnd;
|
glibtop_command cmnd;
|
||||||
glibtop_response response;
|
glibtop_response response;
|
||||||
|
@@ -68,7 +68,7 @@ function output(line) {
|
|||||||
if (param_def == "string") {
|
if (param_def == "string") {
|
||||||
call_param = ", "line_fields[5];
|
call_param = ", "line_fields[5];
|
||||||
param_decl = ",\n "space" const char *"line_fields[5];
|
param_decl = ",\n "space" const char *"line_fields[5];
|
||||||
send_ptr = "\n\tvoid *send_ptr = "line_fields[5]";";
|
send_ptr = "\n\tconst void *send_ptr = "line_fields[5]";";
|
||||||
send_size = "\n\tconst size_t send_size =\n\t\tstrlen ("line_fields[5]") + 1;";
|
send_size = "\n\tconst size_t send_size =\n\t\tstrlen ("line_fields[5]") + 1;";
|
||||||
} else {
|
} else {
|
||||||
call_param = "";
|
call_param = "";
|
||||||
@@ -90,7 +90,7 @@ function output(line) {
|
|||||||
param_decl = param_decl""convert[type]" "fields[field];
|
param_decl = param_decl""convert[type]" "fields[field];
|
||||||
call_param = call_param", "fields[field];
|
call_param = call_param", "fields[field];
|
||||||
if (send_ptr == "")
|
if (send_ptr == "")
|
||||||
send_ptr = "\n\tvoid *send_ptr = &"fields[field]";";
|
send_ptr = "\n\tconst void *send_ptr = &"fields[field]";";
|
||||||
if (send_size == "")
|
if (send_size == "")
|
||||||
send_size = "\n\tconst size_t send_size =\n\t\t";
|
send_size = "\n\tconst size_t send_size =\n\t\t";
|
||||||
else
|
else
|
||||||
@@ -103,14 +103,14 @@ function output(line) {
|
|||||||
else
|
else
|
||||||
send_size = "\n\tconst size_t send_size = 0;";
|
send_size = "\n\tconst size_t send_size = 0;";
|
||||||
if (send_ptr == "")
|
if (send_ptr == "")
|
||||||
send_ptr = "\n\tvoid *send_ptr = NULL;";
|
send_ptr = "\n\tconst void *send_ptr = NULL;";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf"param_decl")";
|
print "glibtop_get_"feature"_l (glibtop *server, glibtop_"feature" *buf"param_decl")";
|
||||||
|
|
||||||
print "{"send_ptr""send_size;
|
print "{"send_ptr""send_size;
|
||||||
if (retval !~ /^void$/)
|
if (retval !~ /^void$/)
|
||||||
print "\t"retval" retval;";
|
print "\t"retval" retval = ("retval") 0;";
|
||||||
print "";
|
print "";
|
||||||
|
|
||||||
print "\tglibtop_init_r (&server, (1 << GLIBTOP_SYSDEPS_"toupper(feature)"), 0);";
|
print "\tglibtop_init_r (&server, (1 << GLIBTOP_SYSDEPS_"toupper(feature)"), 0);";
|
||||||
|
@@ -64,7 +64,7 @@ glibtop_strdup_r (glibtop *server, const char *string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_free_r (glibtop *server, void *ptr)
|
glibtop_free_r (glibtop *server, const void *ptr)
|
||||||
{
|
{
|
||||||
if (ptr) free (ptr);
|
if (ptr) free ((void *) ptr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user