diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ccb88ce81c..c77adc0d10 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,20 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-18 14:42 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + + harbour/include/hbjson.h + + added missing include file + + * harbour/include/hbjson.c + * deleted comment line. It is no valid for current code + + * harbour/src/codepage/Makefile + + harbour/src/codepage/cplt775.c + + added Lithuanian CP-775 (DOS) codepage support + + * harbour/contrib/hbzebra/code39.c + * removed unused commented code + 2010-11-18 13:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbtip/sendmail.prg ! Fixed to not add 'Bcc:' entry to e-mail headers, since this will diff --git a/harbour/contrib/hbzebra/code39.c b/harbour/contrib/hbzebra/code39.c index b8c5e598de..d390583088 100644 --- a/harbour/contrib/hbzebra/code39.c +++ b/harbour/contrib/hbzebra/code39.c @@ -200,8 +200,6 @@ PHB_ZEBRA hb_zebra_create_code39( const char * szCode, HB_SIZE nLen, int iFlags _code39_add( pZebra->pBits, ( char ) s_code[ csum % 43 ], iFlags, HB_FALSE ); _code39_add( pZebra->pBits, 0x52, iFlags, HB_TRUE ); /* stop */ -// hb_bitbuffer_cat_int( pZebra->pBits, 3, iFlags & HB_ZEBRA_FLAG_WIDE2_5 ? 2 : 1 ); - return pZebra; } diff --git a/harbour/include/hbjson.h b/harbour/include/hbjson.h new file mode 100644 index 0000000000..84ca523a40 --- /dev/null +++ b/harbour/include/hbjson.h @@ -0,0 +1,65 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * JavaScript Object Notation (JSON) + * + * Copyright 2010 Mindaugas Kavaliauskas + * www - http://harbour-project.org/ + * + * 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, 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#ifndef HB_JSON_H_ +#define HB_JSON_H_ + +#include "hbapi.h" + +HB_EXTERN_BEGIN + +extern char * hb_jsonEncode( PHB_ITEM pValue, HB_SIZE * pnLen, HB_BOOL fHuman ); +extern HB_SIZE hb_jsonDecode( const char * szSource, PHB_ITEM pValue ); + +HB_EXTERN_END + +#endif /* HB_JSON_H_ */ diff --git a/harbour/src/codepage/Makefile b/harbour/src/codepage/Makefile index 11fac51d60..e8f896ae1a 100644 --- a/harbour/src/codepage/Makefile +++ b/harbour/src/codepage/Makefile @@ -49,6 +49,7 @@ C_SOURCES := \ cpitisb.c \ cpitiso.c \ cpitwin.c \ + cplt775.c \ cpltwin.c \ cpnl850.c \ cpnl850m.c \ diff --git a/harbour/src/codepage/cplt775.c b/harbour/src/codepage/cplt775.c new file mode 100644 index 0000000000..cca4a86fbc --- /dev/null +++ b/harbour/src/codepage/cplt775.c @@ -0,0 +1,63 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * National Collation Support Module ( LTWIN ) + * + * Copyright 2002 Alexander S.Kresin + * www - http://harbour-project.org + * Lithuanian collation sequence + * 2010, by Mindaugas Kavaliauskas + * + * 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, 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#define HB_CP_ID LT775 +#define HB_CP_INFO "Lithuanian CP-775" +#define HB_CP_UNITB HB_UNITB_775 +#define HB_CP_ACSORT HB_CDP_ACSORT_NONE +#define HB_CP_UPPER "AµBC¶DE·¸FGHI½YJKLMNOPQRS¾TUÆÇVWXZÏ" +#define HB_CP_LOWER "aÐbcÑdeÒÓfghiÔyjklmnopqrsÕtuÖ×vwxzØ" + +/* include CP registration code */ +#include "hbcdpreg.h" diff --git a/harbour/src/rtl/hbjson.c b/harbour/src/rtl/hbjson.c index 86cd71b485..4e4cccce3e 100644 --- a/harbour/src/rtl/hbjson.c +++ b/harbour/src/rtl/hbjson.c @@ -81,9 +81,6 @@ hb_jsonEncode( xValue [, lHuman = .F. ] ) --> cJSON Note: - - Harbour types unsupported by JSON (date, timestamp, etc.) are - encoded as null values; - - strings are encoded in UTF-8; - JSON encode functions are safe for recursive arrays and hashes. Recursive part of array or hash will be stored as null. JSON encoder still allows to use same structure in the leaves, in