summaryrefslogtreecommitdiffstats
path: root/lib/libmenu/m_pattern.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2001-01-22 18:01:32 +0000
committermillert <millert@openbsd.org>2001-01-22 18:01:32 +0000
commit84af20cee44481ef9eb2070c76702603863c1a4c (patch)
treeb232b1727be5b5b1854432f2b87c149f7522cb9d /lib/libmenu/m_pattern.c
parentfix memory leaks in SSH2 key exchange; ok markus@ (diff)
downloadwireguard-openbsd-84af20cee44481ef9eb2070c76702603863c1a4c.tar.xz
wireguard-openbsd-84af20cee44481ef9eb2070c76702603863c1a4c.zip
Update to ncurses-5.2-20010114
Diffstat (limited to 'lib/libmenu/m_pattern.c')
-rw-r--r--lib/libmenu/m_pattern.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libmenu/m_pattern.c b/lib/libmenu/m_pattern.c
index 682111ee40e..f750c02aae3 100644
--- a/lib/libmenu/m_pattern.c
+++ b/lib/libmenu/m_pattern.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: m_pattern.c,v 1.3 1999/05/17 03:04:25 millert Exp $ */
+/* $OpenBSD: m_pattern.c,v 1.4 2001/01/22 18:02:05 millert Exp $ */
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include "menu.priv.h"
-MODULE_ID("$From: m_pattern.c,v 1.4 1999/05/16 17:27:28 juergen Exp $")
+MODULE_ID("$From: m_pattern.c,v 1.6 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -52,7 +52,8 @@ MODULE_ID("$From: m_pattern.c,v 1.4 1999/05/16 17:27:28 juergen Exp $")
| pattern is stored
| PatternString - as expected
+--------------------------------------------------------------------------*/
-char *menu_pattern(const MENU * menu)
+NCURSES_EXPORT(char *)
+menu_pattern (const MENU * menu)
{
return (menu ? (menu->pattern ? menu->pattern : "") : (char *)0);
}
@@ -70,7 +71,8 @@ char *menu_pattern(const MENU * menu)
| E_BAD_STATE - menu in user hook routine
| E_NO_MATCH - no item matches pattern
+--------------------------------------------------------------------------*/
-int set_menu_pattern(MENU *menu, const char *p)
+NCURSES_EXPORT(int)
+set_menu_pattern (MENU *menu, const char *p)
{
ITEM *matchitem;
int matchpos;
@@ -101,7 +103,7 @@ int set_menu_pattern(MENU *menu, const char *p)
while(*p)
{
- if ( !isprint(*p) ||
+ if ( !isprint((unsigned char)(*p)) ||
(_nc_Match_Next_Character_In_Item_Name(menu,*p,&matchitem) != E_OK) )
{
Reset_Pattern(menu);