Import of libunicode-0.4

--
libunicode is a library for manipulating Unicode characters and
strings. It understands both the UTF-8 and UCS-2 encodings, and
has a framework for adding support for new encodings.

brad@ ok
This commit is contained in:
margarida 2002-12-19 01:19:52 +00:00
parent 5ce5aad4f3
commit 2f3ebc1d3c
7 changed files with 97 additions and 0 deletions

24
devel/libunicode/Makefile Normal file
View File

@ -0,0 +1,24 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $
COMMENT= "library for manipulating Unicode characters and strings"
DISTNAME= libunicode-0.4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libunicode/0.4/}
MAINTAINER= Margarida Sequeira <margarida@openbsd.org>
# LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
PATCH_LIST= ${PORTSDIR}/infrastructure/patches/patch-lt1.3.5-ltconfig \
patch-*
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (libunicode-0.4.tar.gz) = d788ed7595a0250931f421068f4a0083
RMD160 (libunicode-0.4.tar.gz) = 73b7a9c6ebda87c6bd0b133f98d88fb896235401
SHA1 (libunicode-0.4.tar.gz) = fbe0ac01ba9baf007908ef54673876c6f5941093

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-convert_c,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $
--- convert.c.orig Fri Sep 3 05:33:27 1999
+++ convert.c Mon Dec 16 17:15:23 2002
@@ -27,16 +27,11 @@
#include "unicode.h"
#include "convert.h"
-#ifndef EILSEQ
-/* On some systems, like SunOS, EILSEQ is not defined. On those
- systems we use EBADMSG instead. */
-# define EILSEQ EBADMSG
-#endif
/* Linked list of all character sets. */
static unicode_encoding_t *encodings;
-
+
void
unicode_register_encoding (unicode_encoding_t *vec)
@@ -144,7 +139,7 @@ unicode_iconv_close (unicode_iconv_t cd)
return r;
}
-size_t
+ssize_t
unicode_iconv (unicode_iconv_t cd, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-unicode_h,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $
--- unicode.h.orig Mon Dec 16 17:25:34 2002
+++ unicode.h Mon Dec 16 17:25:45 2002
@@ -26,6 +26,15 @@ extern "C"
#endif
#include <stdlib.h> /* For size_t */
+#include <sys/types.h> /* For ssize_t */
+
+/* We need the error codes so we can see if EILSEQ exists. */
+#include <errno.h>
+
+#ifndef EILSEQ
+/* On some systems, like SunOS and NetBSD, EILSEQ is not defined. */
+# define EILSEQ -2323
+#endif
/* FIXME: assumes 32-bit int. */
typedef unsigned int unicode_char_t;
@@ -187,7 +196,7 @@ int unicode_iconv_close (unicode_iconv_t
Otherwise returns number of conversions performed; this can be 0.
Note that on some systems EILSEQ (a possible error code) is not
defined. On such systems we use EBADMSG instead. */
-size_t unicode_iconv (unicode_iconv_t cd,
+ssize_t unicode_iconv (unicode_iconv_t cd,
const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);

View File

@ -0,0 +1,3 @@
libunicode is a library for manipulating Unicode characters and
strings. It understands both the UTF-8 and UCS-2 encodings, and
has a framework for adding support for new encodings.

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $
lib/libunicode.so.0.0
DYNLIBDIR(%D/lib)

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $
bin/unicode-config
include/unicode.h
lib/libunicode.a
lib/libunicode.la
%%SHARED%%