Deleted Added
full compact
command.c (8645) command.c (8837)
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $Id: command.c,v 1.8 1995/05/19 21:30:32 jkh Exp $
7 * $Id: command.c,v 1.9 1995/05/20 13:24:33 jkh Exp $
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 146 unchanged lines hidden (view full) ---

162 commandFunc func;
163
164 for (i = 0; i < numCommands; i++) {
165 for (j = 0; j < commandStack[i]->ncmds; j++) {
166 /* If it's a shell command, run system on it */
167 if (commandStack[i]->cmds[j].type == CMD_SHELL) {
168 msgNotify("Doing %s", commandStack[i]->cmds[j].ptr);
169 ret = vsystem((char *)commandStack[i]->cmds[j].ptr);
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 146 unchanged lines hidden (view full) ---

162 commandFunc func;
163
164 for (i = 0; i < numCommands; i++) {
165 for (j = 0; j < commandStack[i]->ncmds; j++) {
166 /* If it's a shell command, run system on it */
167 if (commandStack[i]->cmds[j].type == CMD_SHELL) {
168 msgNotify("Doing %s", commandStack[i]->cmds[j].ptr);
169 ret = vsystem((char *)commandStack[i]->cmds[j].ptr);
170 msgDebug("Command `%s' returns status %d\n", commandStack[i]->cmds[j].ptr, ret);
170 if (isDebug())
171 msgDebug("Command `%s' returns status %d\n", commandStack[i]->cmds[j].ptr, ret);
171 }
172 else {
173 /* It's a function pointer - call it with the key and the data */
174 func = (commandFunc)commandStack[i]->cmds[j].ptr;
175 msgNotify("%x: Execute(%s, %s)", func, commandStack[i]->key, commandStack[i]->cmds[j].data);
176 ret = (*func)(commandStack[i]->key, commandStack[i]->cmds[j].data);
172 }
173 else {
174 /* It's a function pointer - call it with the key and the data */
175 func = (commandFunc)commandStack[i]->cmds[j].ptr;
176 msgNotify("%x: Execute(%s, %s)", func, commandStack[i]->key, commandStack[i]->cmds[j].data);
177 ret = (*func)(commandStack[i]->key, commandStack[i]->cmds[j].data);
177 msgDebug("Function @ %x returns status %d\n", commandStack[i]->cmds[j].ptr, ret);
178 if (isDebug())
179 msgDebug("Function @ %x returns status %d\n", commandStack[i]->cmds[j].ptr, ret);
178 }
179 }
180 }
181}
180 }
181 }
182 }
183}