6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
9 * Revision 1.2 1987-08-02 21:48:35 wesommer
10 * Got direction of test incorrect.
12 * Revision 1.1 87/06/23 16:13:00 wesommer
18 static char *rcsid_sms_access_c = "$Header$";
21 #include "sms_private.h"
24 * Check access to a named query.
26 int sms_access(name, argc, argv)
27 char *name; /* Query name */
28 int argc; /* Arg count */
29 char **argv; /* Args */
31 register char **nargv = (char **)malloc(sizeof(char *) * (argc+1));
32 register int status = 0;
34 bcopy((char *)argv, (char *)(nargv+1), sizeof(char *) * argc);
35 status = sms_access_internal(argc+1, nargv);
40 * Check access to a named query, where the query name is argv[0]
41 * and the arguments are the rest of argv[].
43 int sms_access_internal(argc, argv)
44 int argc; /* Arg count */
45 char **argv; /* Args */
49 register sms_params *params = NULL;
50 sms_params *reply = NULL;
55 params->sms_procno = SMS_ACCESS;
56 params->sms_argc = argc;
57 params->sms_argl = NULL;
58 params->sms_argv = argv;
60 if ((status = sms_do_call(params, &reply)) == 0)
61 status = reply->sms_status;
63 sms_destroy_reply(reply);
72 * c-continued-statement-offset: 4