Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CEFDF101D6 for ; Thu, 7 Nov 2013 12:14:01 +0000 (UTC) Received: (qmail 6110 invoked by uid 500); 7 Nov 2013 12:05:10 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 6075 invoked by uid 500); 7 Nov 2013 12:05:05 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 5992 invoked by uid 99); 7 Nov 2013 12:04:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 12:04:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 12:04:50 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 45862238889B; Thu, 7 Nov 2013 12:04:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1539605 - in /apr/apr/branches/1.5.x: ./ tools/gen_test_char.c Date: Thu, 07 Nov 2013 12:04:29 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131107120429.45862238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: trawick Date: Thu Nov 7 12:04:28 2013 New Revision: 1539605 URL: http://svn.apache.org/r1539605 Log: Merge r1539603 from trunk: Switch gen_test_char from an APR app to a plain C app to give more flexibility to the build systems. Submitted by: minfrin Modified: apr/apr/branches/1.5.x/ (props changed) apr/apr/branches/1.5.x/tools/gen_test_char.c Propchange: apr/apr/branches/1.5.x/ ------------------------------------------------------------------------------ Merged /apr/apr/trunk:r1539603 Modified: apr/apr/branches/1.5.x/tools/gen_test_char.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/tools/gen_test_char.c?rev=1539605&r1=1539604&r2=1539605&view=diff ============================================================================== --- apr/apr/branches/1.5.x/tools/gen_test_char.c (original) +++ apr/apr/branches/1.5.x/tools/gen_test_char.c Thu Nov 7 12:04:28 2013 @@ -14,33 +14,14 @@ * limitations under the License. */ -#ifdef CROSS_COMPILE - -#define apr_isalnum(c) (isalnum(((unsigned char)(c)))) -#define apr_isalpha(c) (isalpha(((unsigned char)(c)))) -#define apr_iscntrl(c) (iscntrl(((unsigned char)(c)))) -#define apr_isprint(c) (isprint(((unsigned char)(c)))) -#include -#define APR_HAVE_STDIO_H 1 -#define APR_HAVE_STRING_H 1 - -#else - -#include "apr.h" -#include "apr_lib.h" - -#endif - #if defined(WIN32) || defined(OS2) #define NEED_ENHANCED_ESCAPES #endif -#if APR_HAVE_STDIO_H #include -#endif -#if APR_HAVE_STRING_H #include -#endif +#include +#include /* A bunch of functions in util.c scan strings looking for certain characters. * To make that more efficient we encode a lookup table. @@ -100,15 +81,15 @@ int main(int argc, char *argv[]) } #endif - if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) { + if (!isalnum(c) && !strchr("$-_.+!*'(),:@&=~", c)) { flags |= T_ESCAPE_PATH_SEGMENT; } - if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) { + if (!isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) { flags |= T_OS_ESCAPE_PATH; } - if (!apr_isalnum(c) && !strchr(".-*_ ", c)) { + if (!isalnum(c) && !strchr(".-*_ ", c)) { flags |= T_ESCAPE_URLENCODED; } @@ -117,7 +98,7 @@ int main(int argc, char *argv[]) * backslashes (because we use backslash for escaping) * and 8-bit chars with the high bit set */ - if (c && (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c))) { + if (c && (!isprint(c) || c == '"' || c == '\\' || iscntrl(c))) { flags |= T_ESCAPE_ECHO; }