| version 1.2, 2001/09/21 19:44:51 |
version 1.3, 2001/09/21 19:54:45 |
|
|
| /* |
/* |
| * $Log$ |
* $Log$ |
| |
* Revision 1.3 2001/09/21 19:54:45 host8 |
| |
* Cosmetics changes in *.c |
| |
* |
| * Revision 1.2 2001/09/21 19:44:51 host8 |
* Revision 1.2 2001/09/21 19:44:51 host8 |
| * Added $Log$ keyword substitution |
* Added $Log$ |
| |
* Added Revision 1.3 2001/09/21 19:54:45 host8 |
| |
* Added Cosmetics changes in *.c |
| |
* Added keyword substitution |
| * |
* |
| */ |
*/ |
| #ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| Line 47 fd_add_proclink(fd, link) |
|
| Line 53 fd_add_proclink(fd, link) |
|
| link->proc_id, link->fd_id); |
link->proc_id, link->fd_id); |
| #endif |
#endif |
| |
|
| fd->link = (struct proclink *) realloc(fd->link, |
fd->link = (struct proclink *) realloc(fd->link, |
| (fd->n_link + 1) * sizeof(struct proclink)); |
(fd->n_link + 1) * sizeof(struct proclink)); |
| |
|
| if (fd->link == NULL) { |
if (fd->link == NULL) { |
| Line 75 fd_remove_proclink(fd, link) |
|
| Line 81 fd_remove_proclink(fd, link) |
|
| link->proc_id, link->fd_id); |
link->proc_id, link->fd_id); |
| #endif |
#endif |
| |
|
| while ((index = fd_is_proclink(fd, link)) != 0) |
while ((index = fd_is_proclink(fd, link)) != 0) |
| if (fd_remove_proclink_by_index(fd, index) != 1) |
if (fd_remove_proclink_by_index(fd, index) != 1) |
| return 0; |
return 0; |
| |
|
| Line 94 fd_remove_proclink_by_index(fd, index) |
|
| Line 100 fd_remove_proclink_by_index(fd, index) |
|
| #endif |
#endif |
| |
|
| /* Copying proclinks down by 1. */ |
/* Copying proclinks down by 1. */ |
| for (i = index + 1; i < fd->n_link; i++) |
for (i = index + 1; i < fd->n_link; i++) |
| fd->link[i-1] = fd->link[i]; |
fd->link[i-1] = fd->link[i]; |
| |
|
| if (fd->n_link > 1) { |
if (fd->n_link > 1) { |
| |
|
| /* Reallocating array. */ |
/* Reallocating array. */ |
| fd->link = (struct proclink *)realloc(fd->link, |
fd->link = (struct proclink *)realloc(fd->link, |
| (fd->n_link - 1) * sizeof(struct proclink)); |
(fd->n_link - 1) * sizeof(struct proclink)); |
| |
|
| if (fd->link == NULL) { |
if (fd->link == NULL) { |
| Line 124 fd_remove_proclink_by_index(fd, index) |
|
| Line 130 fd_remove_proclink_by_index(fd, index) |
|
| fd_is_proclink(fd, link) |
fd_is_proclink(fd, link) |
| struct fd *fd; |
struct fd *fd; |
| const struct proclink *link; |
const struct proclink *link; |
| { |
{ |
| register int i; |
register int i; |
| |
|
| for (i = 0; i < fd->n_link; i++) |
for (i = 0; i < fd->n_link; i++) |
| Line 132 fd_is_proclink(fd, link) |
|
| Line 138 fd_is_proclink(fd, link) |
|
| * Why here cannot be this: if (fd->link[i] == *link) |
* Why here cannot be this: if (fd->link[i] == *link) |
| * Does somebody know it?!? |
* Does somebody know it?!? |
| */ |
*/ |
| if (fd->link[i].proc_id == link->proc_id && |
if (fd->link[i].proc_id == link->proc_id && |
| fd->link[i].fd_id == link->fd_id) |
fd->link[i].fd_id == link->fd_id) |
| return i + 1; |
return i + 1; |
| |
|