diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-27 00:16:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-27 00:16:01 +0000 |
commit | fea48988ea866e6ef4f29247a13a8b28eb9be7ce (patch) | |
tree | 40e1433368cfe58c000284730c207907c298c633 /winsup/cygwin/grp.cc | |
parent | 285d6b97b11d0516ba82b0deb59afe746ef8fb93 (diff) | |
download | newlib-fea48988ea866e6ef4f29247a13a8b28eb9be7ce.zip newlib-fea48988ea866e6ef4f29247a13a8b28eb9be7ce.tar.gz newlib-fea48988ea866e6ef4f29247a13a8b28eb9be7ce.tar.bz2 |
* strings.h (strechr): New function.
* uinfo.cc (pwdgrp::next_str): Search only for input char in string. Return
EOS on failure. Don't check for NULL since it shouldn't be possible.
(pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
(pwdgrp::next_num): Pass explicit separator character to next_str.
* grp.cc (pwdgrp::parse_group): Ditto.
* passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage input.
* pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 44abc97..35bba1f 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -37,11 +37,11 @@ bool pwdgrp::parse_group () { # define grp (*group_buf)[curr_lines] - grp.gr_name = next_str (); + grp.gr_name = next_str (':'); if (!*grp.gr_name) return false; - grp.gr_passwd = next_str (); + grp.gr_passwd = next_str (':'); if (!next_num (grp.gr_gid)) return false; |