whitespace clean up.

* *.{c,h} : whitespace clean up.
This commit is contained in:
Benoît Dejean
2004-06-09 18:52:22 +00:00
parent b0edf88ff7
commit 70b0925a82
190 changed files with 739 additions and 735 deletions

View File

@@ -50,7 +50,7 @@ _init_server (glibtop *server, const unsigned features)
if (server->server_rsh == NULL) {
const char *temp = getenv ("LIBGTOP_RSH") ?
getenv ("LIBGTOP_RSH") : "/usr/bin/ssh";
server->server_rsh = g_strdup (temp);
}
@@ -78,15 +78,15 @@ _init_server (glibtop *server, const unsigned features)
/* If the first character of 'server_command' is a colon,
* the first field is the method to connect to the server. */
/* Everything up to the next colon is the method. */
command = g_strdup (server->server_command+1);
temp = strstr (command, ":");
if (temp) *temp = 0;
/* Dispatch method. */
if (!strcmp (command, "direct")) {
/* Use sysdeps dir instead of connecting to server
* even if using the server would be required on
@@ -106,16 +106,16 @@ _init_server (glibtop *server, const unsigned features)
} else {
char *temp2 = strstr (temp+1, ":");
if (temp2) *temp2 = 0;
/* Override default. */
if (server->server_host)
g_free ((char *) server->server_host);
server->server_host = g_strdup (temp+1);
temp = temp2;
}
if (temp == NULL) {
/* If no value was set, we use DEFAULT_PORT. */
if (server->server_port == 0)
@@ -123,10 +123,10 @@ _init_server (glibtop *server, const unsigned features)
} else {
char *temp2 = strstr (temp+1, ":");
if (temp2) *temp2 = 0;
if (sscanf (temp+1, "%ld", &server->server_port) != 1)
server->server_port = DEFAULT_PORT;
temp = temp2 ? temp2 + 1 : temp2;
}
@@ -146,7 +146,7 @@ _init_server (glibtop *server, const unsigned features)
server->server_command+1);
}
g_free (command);
}
@@ -173,27 +173,27 @@ glibtop_init_r (glibtop **server_ptr, unsigned long features, unsigned flags)
if ((server->flags & _GLIBTOP_INIT_STATE_INIT) == 0) {
if (flags & GLIBTOP_FEATURES_EXCEPT)
features = ~features & GLIBTOP_SYSDEPS_ALL;
if (features == 0)
features = GLIBTOP_SYSDEPS_ALL;
if (flags & GLIBTOP_FEATURES_NO_SERVER) {
server->method = GLIBTOP_METHOD_DIRECT;
features = 0;
}
server->features = features;
_init_server (server, features);
server->flags |= _GLIBTOP_INIT_STATE_INIT;
switch (server->method) {
case GLIBTOP_METHOD_PIPE:
case GLIBTOP_METHOD_UNIX:
if (glibtop_server_features & features)
break;
server->method = GLIBTOP_METHOD_DIRECT;
break;
}
@@ -205,11 +205,11 @@ glibtop_init_r (glibtop **server_ptr, unsigned long features, unsigned flags)
return server;
/* Open server, but only if not already opened. */
if ((server->flags & _GLIBTOP_INIT_STATE_OPEN) == 0)
glibtop_open_l (glibtop_global_server, "glibtop",
features, flags);
return server;
}
@@ -218,7 +218,7 @@ glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags)
{
glibtop *server;
glibtop_init_func_t *init_fkt;
if (server_ptr == NULL)
return NULL;
@@ -239,7 +239,7 @@ glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags)
for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++)
(*init_fkt) (server);
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
}