Blanks at the start or end of a line are stripped.
The string will be allocated if s2 is NULL
**/
-_PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f);
+_PUBLIC_ char *x_fgets_slash(char *s2,int maxlen,XFILE *f);
/**
* Read one line (data until next newline or eof) and allocate it
Blanks at the start or end of a line are stripped.
The string will be allocated if s2 is NULL
**/
-_PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
+_PUBLIC_ char *x_fgets_slash(char *s2,int maxlen,XFILE *f)
{
char *s=s2;
int len = 0;
maxlen *= 2;
t = realloc_p(s, char, maxlen);
if (!t) {
- DEBUG(0,("fgets_slash: failed to expand buffer!\n"));
+ DBG_ERR("failed to expand buffer!\n");
SAFE_FREE(s);
return(NULL);
} else s = t;
*name_type = -1;
- if (!fgets_slash(line,sizeof(line),fp)) {
+ if (!x_fgets_slash(line,sizeof(line),fp)) {
continue;
}
DEBUG(4,("Scanning username map %s\n",mapfile));
- while((s=fgets_slash(buf,sizeof(buf),f))!=NULL) {
+ while((s=x_fgets_slash(buf,sizeof(buf),f))!=NULL) {
char *unixname = s;
char *dosname = strchr_m(unixname,'=');
char **dosuserlist;
while (!x_feof(f)) {
TALLOC_CTX *frame = NULL;
- if (!fgets_slash(line,sizeof(line),f))
+ if (!x_fgets_slash(line,sizeof(line),f))
continue;
ptr = line;
/* Read a line from the wins.dat file. Strips whitespace
from the beginning and end of the line. */
- if (!fgets_slash(line,sizeof(line),fp)) {
+ if (!x_fgets_slash(line,sizeof(line),fp)) {
continue;
}
iEtat = 0;
/* scan qconfig file for searching <printername>: */
- for (;(line = fgets_slash(NULL, 1024, pfile)); free(line)) {
+ for (;(line = x_fgets_slash(NULL, 1024, pfile)); free(line)) {
bool ok;
if (*line == '*' || *line == 0)
return false;
}
- for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; free(pcap_line)) {
+ for (; (pcap_line = x_fgets_slash(NULL, 1024, pcap_file)) != NULL;
+ free(pcap_line)) {
char *name = NULL;
char *comment = NULL;
char *p, *q;