🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Harada Kazuyoshi Fri, 30 Oct 1992 00:40
Qs of i18nXView2
#6
Author: Harada Kazuyoshi
Date: Fri, 30 Oct 1992 00:40
28 lines
1831 bytes
$B86ED(J@$B;0MN$G$9!#(J

X11R5$B$N(Jcontrib/lib/i18nXView2$B$rF0$+$=$&$H;W$C$F$^$9$,!"(J
$BEvJ}$N%^%7%s$O!"(JSun386i(SunOS4.0.1 no-JLE)$B$J$N$G!"(J
JLE$B4D6-$,$J$$$H%$%s%9%H!<%k$,Fq$7$$$N$G$O$H46$8$i$l$^$7$F!"(J
$B$I$J$?$+!"$3$N$h$&$J%^%7%s$GF0$+$5$l$?J}!"(J
$B$=$N%3%D$rEA<x$7$FD:$1$^$;$s$G$7$g$&$+!#(J
$BA4$/!"BLL\$@$H8@$C$F2<$5$C$F$b7k9=$G$9!#(J

$B0x$_$K!"(Jmit/lib/X/Ximp$B$r%i%$%V%i%j2=$9$k$3$H$O!"$G$-$F$^$9!#(J
$B$^$?!"(Jcontrib/lib/Xaw$B$r(JXimp$B$G;HMQ$9$k$3$H$b2DG=$J>uBV$G$9!#(J
$B!J$3$l$K$O!"Hu1:(J@SUN$B$5$s!"2OLn(J@$B%=%K!<$5$s$i$NK\(JNews group$B$G$N5-;v$r(J
 $B;29M$K$7$F!"(J
 contrib/lib/Xaw$B$G!"(Jmit/lib/X/Xsi$B$K0MB8$7$?(J_Xip$B$NIU$/4X?t$rF($2$k$h$&$K(J
 $B$7$F$^$9!#(J
 $B<B:]$K$O!"(JXawIm.c$B$NCf$N(J_XipSetIOErrorHandler()$B$r(Jdummy$B4X?t$K$7!"(J
 _XipChangeSpot()$B$r8F$P$J$$$h$&$K(J-DSPOT$BL5$7$G%3%s%Q%$%k$7!"(J
 contrib/im/Xsi/Xwnmo/xwnmo/spotlib.c$B$r0z$CD%$i$J$$$h$&$K$7$^$7$?!#(J
 $B$^$?!"(JXimp & Xaw$B$NAH9g$;$N(Jclients$B$r%3%s%Q%$%k$9$k;~$O!"(J
 	-DNOSTDHDRS -DXI18N -lXaw(i18n) -lXwchar -lXmu -lXt -lX11(imp)
 $B$H!"%o%$%I%-%c%i7OE}$r(Jcontrib/lib/Xwchar$B$KMj$C$F$^$9!#(J
 $B!K(J

$B:G8e$K!"(Jmblen()$B!"(Jmbstowcs()$B!"(Jwcstombs()$B$O!"(JlibXwchar.a$B$KF~$l$F$^$;$s!#(J
$B$3$l$i$,I8=`$G%^%7%s$KL5$$$HCWL?E*$J$N$+$J(J?

----
harada@bl386i.hr.ic.rd.sanyo.co.jp
Re: Qs of i18nXView2
#10
Author: Hideki Hiura
Date: Sun, 01 Nov 1992 14:04
562 lines
15665 bytes
In article <1992Oct30.004024.26878@hr.ic.rd.sanyo.co.jp>
	harada@bl386i.hr.ic.rd.sanyo.co.jp (Harada Kazuyoshi) writes:
> X11R5$@$N(Jcontrib/lib/i18nXView2$@$rF0$+$=$&$H;W$C$F$^$9$,!"(J
> $@EvJ}$N%^%7%s$O!"(JSun386i(SunOS4.0.1 no-JLE)$@$J$N$G!"(J
> JLE$@4D6-$,$J$$$H%$%s%9%H!<%k$,Fq$7$$$N$G$O$H46$8$i$l$^$7$F!"(J

$@$O$$!"$R$H$($K;d(J$@$NITFA$NCW$9$H$3$m!"$4$a$s$J$5$$!#8fLBOG$r$*$+$1$7$F$$$^$9!#(J

> $@0x$_$K!"(Jmit/lib/X/Ximp$@$r%i%$%V%i%j2=$9(J$@$k$3$H$O!"$G$-$F$^$9!#(J
> $@$^$?!"(Jcontrib/lib/Xaw$@$r(JXimp$@$G;HMQ$9$k$3$H$b2DG=$J>uBV$G$9!#(J
> $@!J$3$l$K$O!"Hu(J$@1:(J@SUN$@$5$s!"2OLn(J@$@%=%K!<$5$s$i$NK\(JNews group$@$G$N5-;v$r(J
>  $@;29M$K$7$F!"(J
>  contrib/lib/Xaw$@$G!"(Jmit/lib/X/Xsi$@$K0MB8$7$?(J_Xip$@$NIU$/4X?t$rF($2$k$h$&$K(J
>  $@$7$F$^$9!#(J
>  $@<B:]$K$O!"(JXawIm.c$@$NCf$N(J_XipSetIOErrorHandler()$@$r(Jdummy$@4X?t$K$7!"(J
>  _XipChangeSpot()$@$r8F$P$J$$$h$&$K(J-DSPOT$@L5$7$G%3%s%Q%$%k$7!"(J

Ximp$@$O!"(JX protocol $@$N>e$K9=C[$7$F$"$k$?$a!"FbIt4X?t$r;H$C$F(J error handler
$@$rEPO?$9$kI,MW$O$"$j$^$;$s$7!"(JXimp protocol $@$G$O(J spot location $@$NJQ99$O(J
$@==J,Aa$$$N$G!"N"5;$rMQ0U$9$kI,MW$,$J$$$N$G!"$3$NFs$D$r>C$7$F$b!"(JXimp $@$G(J$@$O(J
$@1F6A$O$J$$$N$G$9!#(J

>  $@$^$?!"(JXimp & Xaw$@$NAH9g$;$N(Jclients$@$r%3%s%Q%$%k$9$k;~$O!"(J
> 	  -DNOSTDHDRS -DXI18N -lXaw(i18n) -lXwchar -lXmu -lXt -lX11(imp)
>  $@$H!"%o%$%I%-%c%i7OE}$r(Jcontrib/lib/Xwchar$@$KMj$C$F$^(J$@$9!#(J

Xwchar $@$r;H$o$J$/$F$b$$$$$h$&$K!"(JSun $@$N(J IM Server $@$G$"$k(J htt $@$r!"(J
$@Hs(J{J,K,H,C}LE$@4D6-$G;H$($k$h$&(J$@$K$9$k$?$a$K(J Ximp $@$G(J build $@$5$l$?(JXlib $@$r;HMQ$7$F$$$k$H(J
$@$$$&2>Dj$N$b$H$K:n$C$?!"(Jwchar $@%5%]!<%H4X?t$rIU(J$@$1$F$*$-$^$9$M!#(J
$@$3$l$G(Ji18nXView2 $@$G$O;n$7$F$J$$$1$I!"$3$l$G;n$7$FD:$1$^$9$+!)(J


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  HttWchar.c HttWchar.h
# Wrapped by hiura@momo on Sat Oct 31 21:40:35 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'HttWchar.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'HttWchar.c'\"
else
echo shar: Extracting \"'HttWchar.c'\" \(8158 characters\)
sed "s/^X//" >'HttWchar.c' <<'END_OF_FILE'
X#ifndef lint
X#ifdef sccs
Xstatic char     sccsid[] = "HttWchar.c 1.3" ;
X#endif
X#endif
X/******************************************************************
X
X              Copyright 1990, 1991, by Sun Microsystems, Inc.
X
XPermission to use, copy, modify, distribute, and sell this software
Xand its documentation for any purpose is hereby granted without fee,
Xprovided that the above copyright notice appear in all copies and
Xthat both that copyright notice and this permission notice appear
Xin supporting documentation, and that the name of Sun Microsystems, Inc.
Xnot be used in advertising or publicity pertaining to distribution
Xof the software without specific, written prior permission.
XSun Microsystems, Inc. makes no representations about the suitability of
Xthis software for any purpose.  It is provided "as is" without
Xexpress or implied warranty.
X
XSun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
XSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
XIN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT
XOR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
XOF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
XOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
XOR PERFORMANCE OF THIS SOFTWARE.
X
X  Author: Hideki Hiura (hhiura@Sun.COM)
X	  				     Sun Microsystems, Inc.
X******************************************************************/
X#include <stdio.h>
X#include <X11/Xlib.h>
X#include "HttWchar.h"
X#ifdef SVR4
X#else /* SVR4 */
X
Xwchar_t *
Xwscpy(s1, s2)
Xregister wchar_t *s1 ;
Xregister wchar_t *s2 ;
X{
X    wchar_t        *s = s1;
X    while ((*s++ = *s2++) != '\0') ;
X    return (s1);
X}
Xwchar_t *
Xwscat(s1, s2)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
X{
X    wchar_t        *s = s1;
X    while (*s++);
X    while ((*s++ = *s2++) != '\0') ;
X    return (s1);
X}
X
Xwchar_t *
Xwsdup(s1)
Xregister wchar_t *s1;
X{
X    char           *malloc();
X    wchar_t        *s ;
X    register wchar_t *s2;
X
X    s = s2 = (wchar_t *) calloc(sizeof(wchar_t), (unsigned) wslen(s1) + 1);
X
X    if (s != (wchar_t *) 0) {
X	while ((*s2++ = *s1++) != '\0') ;
X    }
X    return (s);
X}
X
Xwchar_t *
Xwstrncat(s1, s2, l)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
Xregister int    l;
X{
X    wchar_t        *s = s1;
X    while (*s1++);
X    
X    while (l-- && ((*s1++ = *s2++) != (wchar_t) '\0'));
X    if (!l) *s1 = (wchar_t) '\0';
X
X    return (s);
X}
X
Xint
Xwscmp(s1, s2)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
X{
X    while (*s1 && (*s1 == *s2)) {
X	s1++;
X	s2++;
X    }
X    return (*s1 - *s2);
X}
X
Xint
Xwsncmp(s1, s2, l)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
Xregister int    l;
X{
X    while (--l && *s1 && (*s1 == *s2)) {
X	s1++;
X	s2++;
X    }
X    return (*s1 - *s2);
X}
X
Xwchar_t *
Xwsncpy(s1, s2, l)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
Xregister int    l;
X{
X    wchar_t        *s = s1;
X    while ((l-- > 0) && (*s1++ = *s2++) != '\0') ;
X    while ((l-- > 0)) *s1++ = '\0';
X    return s;
X}
X
Xint
Xwslen(s1)
Xwchar_t *s1;
X{
X    register wchar_t *s= s1;
X    while(*s++) ;
X    return ((s - s1)/sizeof(wchar_t)) ;
X}
X
Xwchar_t *
Xwschr(s1, c)
Xregister wchar_t *s1;
Xregister int    c;
X{
X    while (*s1 && (*s1 != (wchar_t) c)) {
X	s1++;
X    }
X    
X    if ((!*s1) && c) {
X	s1 = (wchar_t *) 0;
X    }
X    return (s1);
X}
X
Xwchar_t        *
Xwsrchr(s1, c)
Xregister wchar_t *s1;
Xregister int    c;
X{
X    register wchar_t *s = (wchar_t *) 0;
X
X    while (*s1) {
X	if (*s1 == (wchar_t) c) {
X	    s = s1;
X	}
X	s1++;
X    }
X    return (s);
X}
X
X
Xwchar_t *
Xwspbrk(s1, s2)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
X{
X    register wchar_t *s;
X    while (*s1) {
X	for (s = s2; *s && *s != *s1; s++) {
X	}
X	if (*s) {
X	    break;
X	}
X	s1++;
X    }
X    
X    if (!*s1) {
X	s1 = (wchar_t *) 0;
X    }
X    return s1;
X}
X
Xint
Xwsspn(s1, s2)
Xregister wchar_t *s1;
Xregister wchar_t *s2;
X{
X    register wchar_t *s;
X    wchar_t        *orig = s1;
X    
X    while (*s1) {
X	for (s = s2; *s && *s != *s1; s++) {
X	}
X	if (!*s) {
X	    break;
X	}
X	s1++;
X    }
X    
X    return ((int) (s1 - orig));
X}
X
Xint
Xwscspn(str1, str2)
X	register wchar_t *str1;
X	register wchar_t *str2;
X{
X	register wchar_t *tmp;
X	wchar_t        *orig = str1;
X
X	while (*str1) {
X		for (tmp = str2; *tmp && *tmp != *str1; tmp++) {
X		}
X		if (*tmp) {
X			break;
X		}
X		str1++;
X	}
X
X	return ((int) (str1 - orig));
X}
X	
Xwchar_t *
Xwcscpy (s1,s2){
X	return wscpy(s1,s2);
X}
Xint
Xwcslen (s1){
X	return wslen(s1) ;
X}
Xmalloc_check_data (){}
Xint
Xwcscmp (s1,s2){
X	return wscmp(s1, s2);
X}
Xint
Xwcstol(s){
X	return wstol(s);
X}
Xlong
Xwstol(){ 
X    printf("Warning: wstol() is not supported\n");
X    return 0;
X}
Xunsigned long
Xmbstowcs(wcs, mbs, n)
Xwchar_t *wcs;
Xchar *mbs;
Xint n;
X{
X    return _Xmbstowcs(wcs, mbs, n);
X}
Xunsigned long
Xwcstombs(mbs, wcs, n)
Xchar *mbs;
Xwchar_t *wcs;
Xint n;
X{
X    return _Xwcstombs(mbs, wcs, n);
X}
Xint
Xmblen(str, len)
Xchar *str;
Xint len;
X{
X    return _Xmblen(str, len);
X}
Xint
Xmbtowc(wstr, str, len)
X    wchar_t *wstr;
X    char *str;
X    int len;
X{
X    return _Xmbtowc(wstr, str, len);
X}
Xint
Xwctomb(str, wc)
X    char *str;
X    wchar_t wc;
X{
X    return _Xwctomb(str, wc);
X}
Xwchar_t *
Xwcsncpy(s1,s2, n)
X{
X	return wsncpy(s1, s2, n);
X}
X
X/*
X * Copyright (c) 1989 The Regents of the University of California. All rights
X * reserved.
X * 
X * Redistribution and use in source and binary forms are permitted provided that
X * the above copyright notice and this paragraph are duplicated in all such
X * forms and that any documentation, advertising materials, and other
X * materials related to such distribution and use acknowledge that the
X * software was developed by the University of California, Berkeley.  The
X * name of the University may not be used to endorse or promote products
X * derived from this software without specific prior written permission. THIS
X * SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
X * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X/*
X * Get next token from string s (NULL on 2nd, 3rd, etc. calls), where tokens
X * are nonempty strings separated by runs of chars from delim.  Writes NULs
X * into s to end tokens.  delim need not remain constant from call to call.
X * 
X * Modified by cpc: 	changed variable names to conform with naming
X * conventions used in rest of code.  Added malloc pointer check calls.
X */
Xwchar_t        *
Xwstok(str1, str2)
X	wchar_t        *str1;
X	wchar_t        *str2;
X{
X	static wchar_t *last;
X	wchar_t        *wstrtoken();
X
X	if (str1) {
X		last = str1;
X	}
X
X	return (wstrtoken(&last, str2, 1));
X}
X
X
X/*
X * Get next token from string *stringp, where tokens are (possibly empty)
X * strings separated by characters from delim.  Tokens are separated by
X * exactly one delimiter iff the skip parameter is false; otherwise they are
X * separated by runs of characters from delim, because we skip over any
X * initial `delim' characters.
X * 
X * Writes NULs into the string at *stringp to end tokens. delim will usually,
X * but need not, remain constant from call to call. On return, *stringp
X * points past the last NUL written (if there might be further tokens), or is
X * NULL (if there are definitely no more tokens).
X * 
X * If *stringp is NULL, strtoken returns NULL.
X */
Xwchar_t        *
Xwstrtoken(stringp, delim, skip)
X	register wchar_t **stringp;
X	register wchar_t *delim;
X	int             skip;
X{
X	register wchar_t *s;
X	register wchar_t *spanp;
X	register int    c, sc;
X	wchar_t        *tok;
X
X	if ((s = *stringp) == NULL)
X		return (NULL);
X
X	if (skip) {
X		/*
X		 * Skip (span) leading delimiters (s += wstrspn(s, delim)).
X		 */
Xcont:
X		c = *s;
X		for (spanp = delim; (sc = *spanp++) != 0;) {
X			if (c == sc) {
X				s++;
X				goto cont;
X			}
X		}
X		if (c == 0) {	/* no token found */
X			*stringp = NULL;
X			return (NULL);
X		}
X	}
X	/*
X	 * Scan token (scan for delimiters: s += wstrcspn(s, delim), sort
X	 * of). Note that delim must have one NUL; we stop if we see that,
X	 * too.
X	 */
X	for (tok = s;;) {
X		c = *s++;
X		spanp = delim;
X		do {
X			if ((sc = *spanp++) == c) {
X				if (c == 0)
X					s = NULL;
X				else
X					s[-1] = 0;
X				*stringp = s;
X				return (tok);
X			}
X		} while (sc != 0);
X	}
X	/* NOTREACHED */
X}
X#endif /* SVR4 */
END_OF_FILE
if test 8158 -ne `wc -c <'HttWchar.c'`; then
    echo shar: \"'HttWchar.c'\" unpacked with wrong size!
fi
# end of 'HttWchar.c'
fi
if test -f 'HttWchar.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'HttWchar.h'\"
else
echo shar: Extracting \"'HttWchar.h'\" \(2744 characters\)
sed "s/^X//" >'HttWchar.h' <<'END_OF_FILE'
X#ifndef lint
X#ifdef sccs
Xstatic char     sccsid[] = "HttWchar.h 1.2"
X#endif
X#endif
X/******************************************************************
X
X              Copyright 1990, 1991, by Sun Microsystems, Inc.
X
XPermission to use, copy, modify, distribute, and sell this software
Xand its documentation for any purpose is hereby granted without fee,
Xprovided that the above copyright notice appear in all copies and
Xthat both that copyright notice and this permission notice appear
Xin supporting documentation, and that the name of Sun Microsystems, Inc.
Xnot be used in advertising or publicity pertaining to distribution
Xof the software without specific, written prior permission.
XSun Microsystems, Inc. makes no representations about the suitability of
Xthis software for any purpose.  It is provided "as is" without
Xexpress or implied warranty.
X
XSun Microsystems Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
XSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
XIN NO EVENT SHALL Sun Microsystems, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT
XOR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
XOF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
XOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
XOR PERFORMANCE OF THIS SOFTWARE.
X
X  Author: Hideki Hiura (hhiura@Sun.COM)
X	  				     Sun Microsystems, Inc.
X******************************************************************/
X#ifndef _HTTWCHAR_H
X#define _HTTWCHAR_H
X
X#ifdef SVR4
X/*
X * 4byte wchar_t representation
X */
X#else /* SVR4 */
X/*
X * 2byte wchar_t representation
X */
X#ifndef SHORT_WCHAR_T
X#define SHORT_WCHAR_T
Xtypedef unsigned short wchar_t;
X#endif
X#define WCHAR_SIZE	2
X#define	WCHAR_CSMASK	0x8080
X#define	EUCMASK		0x8080
X#define	WCHAR_CS0	0x0000
X#define	WCHAR_CS1	0x8080
X#define	WCHAR_CS2	0x0080
X#define	WCHAR_CS3	0x8000
X#define	WCHAR_BYTE_OF(wc,i) (((wc&~0x8080)>>(8*(1-i)))&0x7f)
X#define WCHAR_SHIFT	8
X#define WCHAR_S_MASK	0xff
X#define wcsetno(c)	(((c)&0x8000)?(((c)&0x80)?1:3):(((c)&0x80)?2:0))
X#endif /* SVR4 */
X
Xextern wchar_t* wscpy();
Xextern wchar_t* wsncpy();
Xextern wchar_t* wscat();
Xextern wchar_t* wsncat();
Xextern wchar_t* wschr();
Xextern wchar_t* wsrchr();
Xextern wchar_t* wspbrk();
Xextern wchar_t* wstok();
X
Xextern int wscmp();
Xextern int wsncmp();
Xextern int wslen();
Xextern int wsspn();
Xextern int wscspn();
X
Xextern char *wstostr();
X
Xextern wchar_t *strtows();
X
Xextern wchar_t	*wsdup();
Xextern int	wscol();
Xextern double	wstod();
Xextern long	wstol();
X
X
X#define windex		wschr
X#define wrindex		wsrchr
X
X#define watol(s)        wstol((s),(wchar_t **)0, 10)
X#define watoi(s)        ((int)wstol((s),(wchar_t **)0, 10))
X#define watof(s)        wstod((s),(wchar_t **)0)
X
X#endif /*_HTTWCHAR_H */
END_OF_FILE
if test 2744 -ne `wc -c <'HttWchar.h'`; then
    echo shar: \"'HttWchar.h'\" unpacked with wrong size!
fi
# end of 'HttWchar.h'
fi
echo shar: End of shell archive.
exit 0

--
$@Hu1:(J $@=(<y(J  (HIURA, Hideki)
hhiura@Sun.COM
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads