FILE *fp;
char *cp, *editor = UD_DEFAULT_EDITOR;
static char template[MED_BUF_SIZE];
+#ifndef HAVE_SPAWNLP
int pid;
int status;
+#endif
int rc;
- void (*handler)();
#ifdef DEBUG
if (debug & D_TRACE)
}
else if (pid > 0) {
/* parent - wait until the child proc is done editing */
+ void (*handler)();
handler = SIGNAL(SIGINT, SIG_IGN);
(void) wait(&status);
(void) SIGNAL(SIGINT, handler);
register int i, j;
for (i = 0; attrs[i].quipu_name != NULL; i++) {
- if (!modifiable(attrs[i].quipu_name, flag|ATTR_FLAG_MAY_EDIT))
+ if (!modifiable(attrs[i].quipu_name,
+ (short) (flag|ATTR_FLAG_MAY_EDIT)))
+ {
continue;
+ }
+
fprintf(fp, "%s\n", attrs[i].quipu_name);
if ( attrs[i].number_of_values > MAX_VALUES ) {
printf(" The %s attribute has more than %d values.\n",
#include <ac/time.h>
#include <ac/unistd.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
void
add_group( char *name )
{
- register int i, idx = 0, prompt = 0;
+ int idx = 0, prompt = 0;
char tmp[BUFSIZ], dn[BUFSIZ];
static LDAPMod *attrs[9];
LDAPMod init_rdn, init_owner, init_domain,
#ifdef DEBUG
if (debug & D_GROUPS) {
- register LDAPMod **lpp;
- register char **cpp;
- register int j;
+ LDAPMod **lpp;
+ char **cpp;
+ int i, j;
printf(" About to call ldap_add()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", dn);
{
char s[BUFSIZ], *new_value /* was member */, *values[2];
char attrtype[ 64 ];
- int i;
LDAPMod mod, *mods[2];
LDAPMessage *mp;
* "Bryan Beecher" <bryan@umich.edu>
* Bryan Beecher <bryan@umich.edu>
*/
- register char *cp;
+ char *cp;
if (strchr(s, '<') == NULL) {
for (cp = s; *cp != '@'; cp++)
if (isspace(*cp))
#ifdef DEBUG
if (debug & D_GROUPS) {
- register LDAPMod **lpp;
- register char **cp;
- register int i, j;
+ LDAPMod **lpp;
+ char **cp;
+ int i, j;
printf(" About to call ldap_modify_s()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", group);
mod.mod_op = LDAP_MOD_DELETE;
#ifdef DEBUG
if (debug & D_GROUPS) {
- register LDAPMod **lpp;
- register char **cp;
- register int i, j;
+ LDAPMod **lpp;
+ char **cp;
+ int i, j;
printf(" About to call ldap_modify_s()\n");
printf(" ld = 0x%x\n", ld);
printf(" dn = [%s]\n", group);
/* now tackle the user's commands */
do_commands();
/* NOTREACHED */
+
+ return 0;
}
void
status( void )
{
register char **rdns;
- char *host;
#ifdef DEBUG
if (debug & D_TRACE)
{
FILE *fp; /* for config file */
static char buffer[MED_BUF_SIZE]; /* for input */
+#ifdef HAVE_GETPWUID
struct passwd *pw; /* for getting the home dir */
+#endif
register char *cp; /* for fiddling with buffer */
- char *term; /* for tty set-up */
char *config; /* config file to use */
static char bp[1024]; /* for tty set-up */
* A per-user config file has precedence over any system-wide
* config file, if one exists.
*/
-#ifdef HAVE_GETPWUID_H
+#ifdef HAVE_GETPWUID
if ((pw = getpwuid((uid_t) geteuid())) == (struct passwd *) NULL)
config = config_file;
else {
#ifndef NO_TERMCAP
{
+ char *term;
struct winsize win; /* for tty set-up */
if (((term = getenv("TERM")) == NULL) || (tgetent(bp, term) <= 0))
#include <ac/time.h>
#include <ac/unistd.h>
+#ifdef HAVE_CONIO_H
+#include <conio.h>
+#endif
+
#include <lber.h>
#include <ldap.h>
#include <ldapconfig.h>
/* we have winsock */
#define HAVE_WINSOCK 1
+/* we have <conio.h> */
+#define HAVE_CONIO_H 1
+
/* we have <io.h> */
#define HAVE_IO_H 1
unsigned long tag = 0, netlen, toread;
unsigned char lc;
long rc;
- int noctets;
+ long noctets;
unsigned int diff;
#ifdef LDAP_DEBUG