mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-16 22:29:21 +00:00
OpenBSD fixes
This commit is contained in:
@@ -181,7 +181,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
|
|||||||
if (type == APROPOS) {
|
if (type == APROPOS) {
|
||||||
char label[BUFSIZ];
|
char label[BUFSIZ];
|
||||||
|
|
||||||
strcpy(tmp, MANTEMP); /* get a temp file. */
|
strlcpy(tmp, MANTEMP, sizeof(tmp)); /* get a temp file. */
|
||||||
#ifdef HAS_MKSTEMP
|
#ifdef HAS_MKSTEMP
|
||||||
fd = mkstemp(tmp);
|
fd = mkstemp(tmp);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
@@ -199,14 +199,14 @@ DoSearch(ManpageGlobals * man_globals, int type)
|
|||||||
if (!ReadManConfig(path))
|
if (!ReadManConfig(path))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
strcpy(path,SYSMANPATH);
|
strlcpy(path,SYSMANPATH,sizeof(path));
|
||||||
#ifdef LOCALMANPATH
|
#ifdef LOCALMANPATH
|
||||||
strcat(path,":");
|
strlcat(path,":",sizeof(path));
|
||||||
strcat(path,LOCALMANPATH);
|
strlcat(path,LOCALMANPATH,sizeof(path));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
strcpy(path,manpath);
|
strlcpy(path,manpath,sizeof(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(label, sizeof(label),
|
snprintf(label, sizeof(label),
|
||||||
@@ -268,7 +268,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
|
snprintf(man_globals->manpage_title,sizeof(man_globals->manpage_title),
|
||||||
"%s", label);
|
"%s", label);
|
||||||
ChangeLabel(man_globals->label,label);
|
ChangeLabel(man_globals->label,label);
|
||||||
fseek(file, 0L, SEEK_SET); /* reset file to point at top. */
|
fseek(file, 0L, SEEK_SET); /* reset file to point at top. */
|
||||||
@@ -276,7 +276,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
|
|||||||
else { /* MANUAL SEACH */
|
else { /* MANUAL SEACH */
|
||||||
file = DoManualSearch(man_globals, search_string);
|
file = DoManualSearch(man_globals, search_string);
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
|
snprintf(string_buf,sizeof(string_buf),"No manual entry for %s.", search_string);
|
||||||
ChangeLabel(man_globals->label, string_buf);
|
ChangeLabel(man_globals->label, string_buf);
|
||||||
if (man_globals->label == NULL)
|
if (man_globals->label == NULL)
|
||||||
PopupWarning(man_globals, string_buf);
|
PopupWarning(man_globals, string_buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user