Lines Matching defs:al
58 initarg(struct arglist *al)
60 al->argc = 0;
61 al->maxc = 10;
62 if ((al->argv = calloc(al->maxc, sizeof (char *))) == NULL)
67 addarg(struct arglist *al, const char *arg)
70 if (al->argc == al->maxc) {
71 al->maxc <<= 1;
72 al->argv = realloc(al->argv, al->maxc * sizeof (char *));
73 if (al->argv == NULL)
77 al->argv[al->argc++] = NULL;
78 else if ((al->argv[al->argc++] = strdup(arg)) == NULL)
91 struct arglist al;
102 initarg(&al);
103 addarg(&al, argv[0]);
107 addarg(&al, argv[i]);
108 addarg(&al, NULL);
113 execve(_PATH_DEFAULTMTA, al.argv, envp);
149 addarg(&al, ap);
160 addarg(&al, argv[i]);
162 addarg(&al, NULL);
163 execve(to, al.argv, envp);