Lines Matching defs:line

66 				/* routine to turn line into ldap entries */
69 int (*filedbmline)(); /* routine to turn file line into dbm line */
196 blankline(char *line)
200 for (p = line; *p; p++)
225 line_buf_expand(struct line_buf *line)
227 line->alloc += BUFSIZ;
228 line->str = (char *)realloc(line->str, line->alloc);
230 if (line->str == NULL) {
238 line_buf_init(struct line_buf *line)
240 (void) memset((char *)line, 0, sizeof (*line));
241 line_buf_expand(line);
598 genent_hosts(char *line, int (*cback)())
613 if (strlen(line) >= sizeof (buf)) {
614 (void) strlcpy(parse_err_msg, gettext("line too long"),
618 (void) strcpy(buf, line);
846 /* end of line */
855 genent_rpc(char *line, int (*cback)())
871 if (strlen(line) >= sizeof (buf)) {
872 (void) strlcpy(parse_err_msg, gettext("line too long"),
876 (void) strcpy(buf, line);
1055 /* end of line */
1066 genent_protocols(char *line, int (*cback)())
1082 if (strlen(line) >= sizeof (buf)) {
1083 (void) strlcpy(parse_err_msg, gettext("line too long"),
1087 (void) strcpy(buf, line);
1272 /* end of line */
1287 genent_networks(char *line, int (*cback)())
1304 if (strlen(line) >= sizeof (buf)) {
1305 (void) strlcpy(parse_err_msg, gettext("line too long"),
1309 (void) strcpy(buf, line);
1493 /* end of line */
1507 genent_services(char *line, int (*cback)())
1523 if (strlen(line) >= sizeof (buf)) {
1524 (void) strlcpy(parse_err_msg, gettext("line too long"),
1528 (void) strcpy(buf, line);
1649 gettext("Adding entry : %s\n"), line);
1741 /* end of line */
1752 genent_group(char *line, int (*cback)())
1766 if (strlen(line) >= sizeof (buf)) {
1767 (void) strlcpy(parse_err_msg, gettext("line too long"),
1771 (void) strcpy(buf, line);
1957 genent_ethers(char *line, int (*cback)())
1969 if (strlen(line) >= sizeof (buf)) {
1970 (void) strlcpy(parse_err_msg, gettext("line too long"),
1974 (void) strcpy(buf, line);
2069 genent_aliases(char *line, int (*cback)())
2085 if (strlen(line) >= sizeof (buf)) {
2086 (void) strlcpy(parse_err_msg, gettext("line too long"),
2091 (void) strcpy(buf, line);
2192 genent_publickey(char *line, int (*cback)())
2211 if (strlen(line) >= sizeof (buf)) {
2212 (void) strlcpy(parse_err_msg, gettext("line too long"),
2216 (void) strcpy(buf, line);
2477 genent_netmasks(char *line, int (*cback)())
2490 if (strlen(line) >= sizeof (buf)) {
2491 (void) strlcpy(parse_err_msg, gettext("line too long"),
2495 (void) strcpy(buf, line);
2582 genent_netgroup(char *line, int (*cback)())
2594 if (strlen(line) >= sizeof (buf)) {
2595 (void) strlcpy(parse_err_msg, gettext("line too long"),
2599 (void) strcpy(buf, line);
2684 * 1 netgroup member), proceed with the rest of the line
2819 genent_automount(char *line, int (*cback)())
2831 if (strlen(line) >= sizeof (buf)) {
2832 (void) strlcpy(parse_err_msg, gettext("line too long"),
2838 replace_tab2space(line);
2839 (void) strcpy(buf, line);
2928 genent_passwd(char *line, int (*cback)())
2943 if (strlen(line) >= sizeof (buf)) {
2944 (void) strlcpy(parse_err_msg, gettext("line too long"),
2948 (void) strcpy(buf, line);
3166 genent_shadow(char *line, int (*cback)())
3181 if (strlen(line) >= sizeof (buf)) {
3182 (void) strlcpy(parse_err_msg, gettext("line too long"),
3186 (void) strcpy(buf, line);
3509 genent_bootparams(char *line, int (*cback)())
3523 if (strlen(line) >= sizeof (buf)) {
3524 (void) strlcpy(parse_err_msg, gettext("line too long"),
3528 (void) strcpy(buf, line);
3643 genent_project(char *line, int (*cback)())
3657 if (strlen(line) >= sizeof (buf)) {
3658 (void) strlcpy(parse_err_msg, gettext("line too long"),
3663 if (count_tokens(line, ':') != 6) {
3669 (void) strcpy(buf, line);
3906 fget_line_at(struct line_buf *line, int n, FILE *fp)
3910 line->len = n;
3916 if (line->len >= line->alloc)
3917 line_buf_expand(line);
3918 line->str[line->len++] = c;
3925 if (line->len >= line->alloc)
3926 line_buf_expand(line);
3927 line->str[line->len++] = 0;
3930 if (line->str[0] == '\0')
3933 return (line->str);
3937 * return a line from the file, discarding comments and blank lines
3940 filedbmline_comment(struct line_buf *line, FILE *etcf, int *lineno,
3947 if (fget_line_at(line, len, etcf) == 0)
3953 len = strlen(line->str);
3955 line->str[0] != '#' &&
3956 line->str[len-2] == '\\' && line->str[len-1] == '\n') {
3957 line->str[len-2] = 0;
3959 continue; /* append next line at end */
3962 if (line->str[len-1] == '\n') {
3963 line->str[len-1] = 0;
3971 if (line->str[i] == '#') {
3972 line->str[i] = '\0';
3976 if (line->str[i] != ' ' && line->str[i] != '\t')
3981 * A line with one or more white space characters followed
3983 * line with '#' in the first byte will have len == 0.
3985 if (len > 0 && !blankline(line->str))
3997 * return a line from the file, discarding comments, blanks, and '+' lines
4000 filedbmline_plus(struct line_buf *line, FILE *etcf, int *lineno,
4007 if (fget_line_at(line, len, etcf) == 0)
4013 len = strlen(line->str);
4014 if (line->str[len-1] == '\n') {
4015 line->str[len-1] = 0;
4019 if (!blankline(line->str) &&
4020 line->str[0] != '+' && line->str[0] != '-' &&
4021 line->str[0] != '#')
4093 struct line_buf line;
4097 line_buf_init(&line);
4100 while (tt->filedbmline(&line, etcf, &lineno, &loc)) {
4101 switch ((*(tt->genent))(line.str, addentry)) {
4106 gettext("parse error: %s (line %d)\n"),
4112 gettext("Error while adding line: %s\n"),
4113 line.str);
4115 free(line.str);
4119 gettext("Internal Error while adding line: %s\n"),
4120 line.str);
4122 free(line.str);
4126 free(line.str);