aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/strings.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/strings.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/strings.c b/contrib/ncurses/ncurses/tinfo/strings.c
index 8198ec4050ad..5fa68caf7534 100644
--- a/contrib/ncurses/ncurses/tinfo/strings.c
+++ b/contrib/ncurses/ncurses/tinfo/strings.c
@@ -36,15 +36,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id")
+MODULE_ID("$Id: strings.c,v 1.3 2000/12/10 02:55:08 tom Exp $")
/****************************************************************************
* Useful string functions (especially for mvcur)
****************************************************************************/
#if !HAVE_STRSTR
-char *
-_nc_strstr(const char *haystack, const char *needle)
+NCURSES_EXPORT(char *)
+_nc_strstr
+(const char *haystack, const char *needle)
{
size_t len1 = strlen(haystack);
size_t len2 = strlen(needle);
@@ -64,8 +65,9 @@ _nc_strstr(const char *haystack, const char *needle)
/*
* Initialize the descriptor so we can append to it.
*/
-string_desc *
-_nc_str_init(string_desc * dst, char *src, size_t len)
+NCURSES_EXPORT(string_desc *)
+_nc_str_init
+(string_desc * dst, char *src, size_t len)
{
if (dst != 0) {
dst->s_head = src;
@@ -80,8 +82,9 @@ _nc_str_init(string_desc * dst, char *src, size_t len)
/*
* Initialize the descriptor for only tracking the amount of memory used.
*/
-string_desc *
-_nc_str_null(string_desc * dst, size_t len)
+NCURSES_EXPORT(string_desc *)
+_nc_str_null
+(string_desc * dst, size_t len)
{
return _nc_str_init(dst, 0, len);
}
@@ -89,8 +92,9 @@ _nc_str_null(string_desc * dst, size_t len)
/*
* Copy a descriptor
*/
-string_desc *
-_nc_str_copy(string_desc * dst, string_desc * src)
+NCURSES_EXPORT(string_desc *)
+_nc_str_copy
+(string_desc * dst, string_desc * src)
{
*dst = *src;
return dst;
@@ -99,7 +103,7 @@ _nc_str_copy(string_desc * dst, string_desc * src)
/*
* Replaces strcat into a fixed buffer, returning false on failure.
*/
-bool
+NCURSES_EXPORT(bool)
_nc_safe_strcat(string_desc * dst, const char *src)
{
if (src != 0) {
@@ -120,7 +124,7 @@ _nc_safe_strcat(string_desc * dst, const char *src)
/*
* Replaces strcpy into a fixed buffer, returning false on failure.
*/
-bool
+NCURSES_EXPORT(bool)
_nc_safe_strcpy(string_desc * dst, const char *src)
{
if (src != 0) {