static char rcsid_module_c[] = "$Header$";
#endif
-/* This is the file attach.c for allmaint, the SMS client that allows
- * a user to maintaint most important parts of the SMS database.
+/* This is the file attach.c for the SMS Client, which allows a nieve
+ * user to quickly and easily maintain most parts of the SMS database.
* It Contains: Functions for maintaining data used by Hesiod
* to map courses/projects/users to their file systems,
* and maintain filesys info.
*
* Created: 5/4/88
* By: Chris D. Peterson
- * Based Upon: attach.c 87/07/24 marcus
*
* $Source$
* $Author$
* $Header$
*
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * Copyright 1988 by the Massachusetts Institute of Technology.
*
* For further information on copyright and distribution
* see the file mit-copyright.h
#include <menu.h>
#include "mit-copyright.h"
-#include "allmaint.h"
-#include "allmaint_funcs.h"
+#include "defs.h"
+#include "f_defs.h"
#include "globals.h"
#include "infodefs.h"
switch (type) {
case LABEL:
if ( (stat = sms_query("get_filesys_by_label", 1, &name,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, NULL);
return(NULL);
}
break;
case MACHINE:
if ( (stat = sms_query("get_filesys_by_machine", 1, &name,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, NULL);
return(NULL);
}
break;
case GROUP:
if ( (stat = sms_query("get_filesys_by_group", 1, &name,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, NULL);
return(NULL);
}
args[ALIAS_NAME] = name;
args[ALIAS_TYPE] = FS_ALIAS_TYPE;
args[ALIAS_TRANS] = "*";
- if ( (stat = sms_query("get_alias", 3, args, StoreInfo, &elem)) != 0) {
+ if ( (stat = sms_query("get_alias", 3, args, StoreInfo,
+ (char *) &elem)) != 0) {
com_err(program_name, stat, " in get_alias.");
return(NULL);
}
int argc;
char **argv;
{
- struct qelem *top, *elem;
+ struct qelem *top;
- top = elem = GetFSInfo(LABEL, argv[1]); /* get info. */
- while(elem != NULL) {
- char ** info = (char **) elem->q_data;
- (void) PrintFSInfo(info);
- elem = elem->q_forw;
- }
+ top = GetFSInfo(LABEL, argv[1]); /* get info. */
+ Loop(top, (void *) PrintFSInfo);
FreeQueue(top); /* clean the queue. */
return (DM_NORMAL);
}
int argc;
char **argv;
{
- struct qelem *top, *elem;
-
- top = elem = GetFSInfo(ALIAS, argv[1]);
+ struct qelem *top;
+ top = GetFSInfo(ALIAS, argv[1]);
Put_message(" "); /* blank line. */
- while (elem != NULL) {
- char **info = (char **) elem->q_data;
- PrintFSAlias(info);
- elem = elem->q_forw;
- }
-
+ Loop(top, (void *) PrintFSAlias);
FreeQueue(top);
return(DM_NORMAL);
}
* print out values, free memory used and then exit.
*/
- if ( (stat = sms_query("get_alias", 3, args, StoreInfo, &elem)) == 0) {
+ if ( (stat = sms_query("get_alias", 3, args, StoreInfo,
+ (char *)&elem)) == 0) {
top = elem = QueueTop(elem);
while (elem != NULL) {
info = (char **) elem->q_data;