[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] CVS: proftpd/include utf8.h,NONE,1.1 conf.h,1.63,1.64 dirtree.h,1.61,1.62
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2006-05-25 16:55:36
Message-ID: E1FjJ7Y-0001T0-HV () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4276/include

Modified Files:
	conf.h dirtree.h 
Added Files:
	utf8.h 
Log Message:

Adding UTF8 encoding/decoding functions.  Marking source, preparing it
for use with the gettext utilities.

Part of the work towards making the proftpd source i18n/l10n ready.


--- NEW FILE ---
/*
 * ProFTPD - FTP server daemon
 * Copyright (c) 2006 The ProFTPD Project team
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
 *
 * As a special exemption, The ProFTPD Project team and other respective
 * copyright holders give permission to link this program with OpenSSL, and
 * distribute the resulting executable, without including the source code for
 * OpenSSL in the source distribution.
 */

/* UTF8 encoding/decoding
 * $Id: utf8.h,v 1.1 2006/05/25 16:55:34 castaglia Exp $
 */

#ifndef PR_UTF8_H
#define PR_UTF8_H

/*
 */
char *pr_utf8_decode(pool *p, const char *in, size_t inlen, size_t *outlen);

/*
 */
char *pr_utf8_encode(pool *p, const char *in, size_t inlen, size_t *outlen);

/* Internal use only. */
int utf8_init(void);
int utf8_free(void);

#endif /* PR_UTF8_H */

Index: conf.h
===================================================================
RCS file: /cvsroot/proftp/proftpd/include/conf.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- conf.h	18 May 2006 15:38:44 -0000	1.63
+++ conf.h	25 May 2006 16:55:34 -0000	1.64
@@ -241,6 +241,17 @@
 # endif /* HAVE_SYS_TERMIO_H */
 #endif /* HAVE_SYS_TERMIOS_H */
 
+#ifdef PR_USE_NLS
+# ifdef HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+# define _(str) gettext(str)
+#else
+# define _(str) (str)
+# define textdomain(dir)
+# define bindtextdomain(pkg, dir)
+#endif /* PR_USE_NLS */
+
 /* The tunable options header needs to be included after all the system headers,
  * so that limits are picked up properly.
  */
@@ -419,6 +430,7 @@
 #include "event.h"
 #include "var.h"
 #include "trace.h"
+#include "utf8.h"
 #include "compat.h"
 #include "pr-syslog.h"
 

Index: dirtree.h
===================================================================
RCS file: /cvsroot/proftp/proftpd/include/dirtree.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- dirtree.h	16 Apr 2006 22:45:54 -0000	1.61
+++ dirtree.h	25 May 2006 16:55:34 -0000	1.62
@@ -202,13 +202,13 @@
 
 #define CHECK_CMD_ARGS(x, n)	\
   if ((x)->argc != (n)) { \
-    pr_response_add_err(R_501, "Invalid number of arguments."); \
+    pr_response_add_err(R_501, _("Invalid number of arguments")); \
     return ERROR((x)); \
   }
 
 #define CHECK_CMD_MIN_ARGS(x, n)	\
   if ((x)->argc < (n)) { \
-    pr_response_add_err(R_501, "Invalid number of arguments."); \
+    pr_response_add_err(R_501, _("Invalid number of arguments")); \
     return ERROR((x)); \
   }
 



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic