konto_check 5.8.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ext/konto_check_raw/konto_check.c +255 -91
- data/ext/konto_check_raw/konto_check.h +8 -3
- data/ext/konto_check_raw/konto_check_raw_ruby.c +7 -3
- data/ext/konto_check_raw/retvals.h +10 -0
- metadata +11 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 053b8ec3c8f061abf51dda3b7a61869f45240975
|
4
|
+
data.tar.gz: c07b4ce5d8d9da73d093069c657fcebdd7f8b799
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b50d6fa5e45d49234decd9cbe6cd6d3773d7d7f9991450519ab5e7a5c9f4df0e0effdf90882ba67527d9233d14a60d00d94a6f33f792a20c62dfc57381bbcc8
|
7
|
+
data.tar.gz: 494a525b1b2416f5b978d77c555371c5578dc5ae7716869b2ce559db65bdd8e77f79b97e040cab32a2a433edaa5f3d0bd64be4379d9c241114cf0deac1167e68
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* # wurden aus der aktuellen BLZ-Datei der Deutschen Bundesbank #
|
14
14
|
* # �bernommen. #
|
15
15
|
* # #
|
16
|
-
* # Copyright (C) 2002-
|
16
|
+
* # Copyright (C) 2002-2017 Michael Plugge <m.plugge@hs-mannheim.de> #
|
17
17
|
* # #
|
18
18
|
* # Dieses Programm ist freie Software; Sie d�rfen es unter den #
|
19
19
|
* # Bedingungen der GNU Lesser General Public License, wie von der Free #
|
@@ -45,15 +45,15 @@
|
|
45
45
|
* # im Internet herunterladen. #
|
46
46
|
* ##########################################################################
|
47
47
|
*/
|
48
|
-
#line 332 "
|
48
|
+
#line 332 "konto_check.lxx"
|
49
49
|
|
50
50
|
/* Definitionen und Includes */
|
51
51
|
#ifndef VERSION
|
52
|
-
#define VERSION "5.
|
52
|
+
#define VERSION "5.10 (final)"
|
53
53
|
#define VERSION_MAJOR 5
|
54
|
-
#define VERSION_MINOR
|
54
|
+
#define VERSION_MINOR 10
|
55
55
|
#endif
|
56
|
-
#define VERSION_DATE "
|
56
|
+
#define VERSION_DATE "2017-03-10"
|
57
57
|
|
58
58
|
#ifndef INCLUDE_KONTO_CHECK_DE
|
59
59
|
#define INCLUDE_KONTO_CHECK_DE 1
|
@@ -104,8 +104,8 @@ static lzo_align_t __LZO_MMODEL wrkmem[LZO1X_1_MEM_COMPRESS];
|
|
104
104
|
#define KONTO_CHECK_VARS
|
105
105
|
#include "konto_check.h"
|
106
106
|
|
107
|
-
/* Flag, um die �nderungen zum
|
108
|
-
static int
|
107
|
+
/* Flag, um die �nderungen zum M�rz 2017 zu aktivieren */
|
108
|
+
static int pz_aenderungen_aktivieren_2017_03;
|
109
109
|
|
110
110
|
/* falls die Variable verbose_debug gesetzt wird, werden bei einigen
|
111
111
|
* Funktionen mittels perror() zus�tzliche Debuginfos ausgegeben. Die
|
@@ -242,7 +242,7 @@ static int convert_encoding(char **data,UINT4 *len);
|
|
242
242
|
#define free(ptr) efree(ptr)
|
243
243
|
#endif
|
244
244
|
|
245
|
-
#line 770 "
|
245
|
+
#line 770 "konto_check.lxx"
|
246
246
|
|
247
247
|
/* Testwert zur Markierung ung�ltiger Ziffern im BLZ-String (>8 Stellen) */
|
248
248
|
#define BLZ_FEHLER 100000000
|
@@ -378,7 +378,7 @@ static int convert_encoding(char **data,UINT4 *len);
|
|
378
378
|
*/
|
379
379
|
#define CHECK_RETVAL(fkt) do{if((retval=fkt)!=OK)goto fini;}while(0) /* es mu� noch aufger�umt werden, daher goto */
|
380
380
|
#define CHECK_RETURN(fkt) do{if((retval=fkt)!=OK)return retval;}while(0)
|
381
|
-
#line 911 "
|
381
|
+
#line 911 "konto_check.lxx"
|
382
382
|
|
383
383
|
/* einige Makros zur Umwandlung zwischen unsigned int und char */
|
384
384
|
#define UCP (unsigned char*)
|
@@ -498,7 +498,7 @@ int pz=-777;
|
|
498
498
|
|
499
499
|
#define E_START(x)
|
500
500
|
#define E_END(x)
|
501
|
-
#line 1036 "
|
501
|
+
#line 1036 "konto_check.lxx"
|
502
502
|
|
503
503
|
/* Variable f�r die Methoden 27, 29 und 69 */
|
504
504
|
static const int m10h_digits[4][10]={
|
@@ -947,7 +947,7 @@ static int create_lutfile_int(char *name, char *prolog, int slots,FILE **lut)
|
|
947
947
|
* ###########################################################################
|
948
948
|
*/
|
949
949
|
|
950
|
-
#line 1485 "
|
950
|
+
#line 1485 "konto_check.lxx"
|
951
951
|
DLL_EXPORT int write_lut_block(char *lutname,UINT4 typ,UINT4 len,char *data)
|
952
952
|
{
|
953
953
|
char buffer[SLOT_BUFFER],*ptr;
|
@@ -985,7 +985,7 @@ DLL_EXPORT int write_lut_block(char *lutname,UINT4 typ,UINT4 len,char *data)
|
|
985
985
|
* #############################################################################
|
986
986
|
*/
|
987
987
|
|
988
|
-
#line 1523 "
|
988
|
+
#line 1523 "konto_check.lxx"
|
989
989
|
static int write_lut_block_int(FILE *lut,UINT4 typ,UINT4 len,char *data)
|
990
990
|
{
|
991
991
|
char buffer[SLOT_BUFFER],*ptr,*cptr;
|
@@ -1121,7 +1121,7 @@ static int write_lut_block_int(FILE *lut,UINT4 typ,UINT4 len,char *data)
|
|
1121
1121
|
* ###########################################################################
|
1122
1122
|
*/
|
1123
1123
|
|
1124
|
-
#line 1659 "
|
1124
|
+
#line 1659 "konto_check.lxx"
|
1125
1125
|
DLL_EXPORT int read_lut_block(char *lutname, UINT4 typ,UINT4 *blocklen,char **data)
|
1126
1126
|
{
|
1127
1127
|
int retval;
|
@@ -1144,7 +1144,7 @@ DLL_EXPORT int read_lut_block(char *lutname, UINT4 typ,UINT4 *blocklen,char **da
|
|
1144
1144
|
* ###########################################################################
|
1145
1145
|
*/
|
1146
1146
|
|
1147
|
-
#line 1683 "
|
1147
|
+
#line 1683 "konto_check.lxx"
|
1148
1148
|
DLL_EXPORT int read_lut_slot(char *lutname,int slot,UINT4 *blocklen,char **data)
|
1149
1149
|
{
|
1150
1150
|
int retval;
|
@@ -1166,7 +1166,7 @@ DLL_EXPORT int read_lut_slot(char *lutname,int slot,UINT4 *blocklen,char **data)
|
|
1166
1166
|
* ###########################################################################
|
1167
1167
|
*/
|
1168
1168
|
|
1169
|
-
#line 1706 "
|
1169
|
+
#line 1706 "konto_check.lxx"
|
1170
1170
|
static int read_lut_block_int(FILE *lut,int slot,int typ,UINT4 *blocklen,char **data)
|
1171
1171
|
{
|
1172
1172
|
char buffer[SLOT_BUFFER],*ptr,*sbuffer,*dbuffer;
|
@@ -1256,7 +1256,7 @@ static int read_lut_block_int(FILE *lut,int slot,int typ,UINT4 *blocklen,char **
|
|
1256
1256
|
FREE(sbuffer);
|
1257
1257
|
RETURN(ERROR_MALLOC);
|
1258
1258
|
}
|
1259
|
-
#line 1811 "
|
1259
|
+
#line 1811 "konto_check.lxx"
|
1260
1260
|
|
1261
1261
|
if(fread(sbuffer,1,compressed_len,lut)<compressed_len){
|
1262
1262
|
FREE(sbuffer);
|
@@ -2849,7 +2849,7 @@ DLL_EXPORT int lut_info_id(char *lut_name,int *info1,int *info2,int *valid1,int
|
|
2849
2849
|
* ###########################################################################
|
2850
2850
|
*/
|
2851
2851
|
|
2852
|
-
#line 3404 "
|
2852
|
+
#line 3404 "konto_check.lxx"
|
2853
2853
|
DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int *valid2)
|
2854
2854
|
{
|
2855
2855
|
char *ptr,*ptr1,buffer[128];
|
@@ -2937,7 +2937,7 @@ DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int
|
|
2937
2937
|
|
2938
2938
|
/* Infoblocks lesen: 1. Infoblock */
|
2939
2939
|
if((ret=read_lut_block_int(in,0,LUT2_INFO,&cnt,&ptr))==OK){
|
2940
|
-
#line 3493 "
|
2940
|
+
#line 3493 "konto_check.lxx"
|
2941
2941
|
*(ptr+cnt)=0;
|
2942
2942
|
if(valid1){
|
2943
2943
|
for(ptr1=ptr,v1=v2=0;*ptr1 && *ptr1!='\n' && !isdigit(*ptr1);ptr1++);
|
@@ -2985,7 +2985,7 @@ DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int
|
|
2985
2985
|
|
2986
2986
|
/* Infoblocks lesen: 2. Infoblock */
|
2987
2987
|
if((ret=read_lut_block_int(in,0,LUT2_2_INFO,&cnt,&ptr))==OK){
|
2988
|
-
#line 3542 "
|
2988
|
+
#line 3542 "konto_check.lxx"
|
2989
2989
|
*(ptr+cnt)=0;
|
2990
2990
|
if(valid2){
|
2991
2991
|
for(ptr1=ptr,v1=v2=0;*ptr1 && *ptr1!='\n' && !isdigit(*ptr1);ptr1++);
|
@@ -3204,7 +3204,7 @@ DLL_EXPORT int copy_lutfile(char *old_name,char *new_name,int new_slots)
|
|
3204
3204
|
qsort(slotdir,slot_cnt,sizeof(int),cmp_int);
|
3205
3205
|
for(last_slot=-1,i=0;i<(int)slot_cnt;i++)if((typ=slotdir[i]) && typ!=(UINT4)last_slot){
|
3206
3206
|
read_lut_block_int(lut1,0,typ,&len,&data);
|
3207
|
-
#line 3762 "
|
3207
|
+
#line 3762 "konto_check.lxx"
|
3208
3208
|
write_lut_block_int(lut2,typ,len,data);
|
3209
3209
|
FREE(data);
|
3210
3210
|
last_slot=typ;
|
@@ -3434,7 +3434,7 @@ DLL_EXPORT int lut_init(char *lut_name,int required,int set)
|
|
3434
3434
|
* # Copyright (C) 2008 Michael Plugge <m.plugge@hs-mannheim.de> #
|
3435
3435
|
* ###########################################################################
|
3436
3436
|
*/
|
3437
|
-
#line 3992 "
|
3437
|
+
#line 3992 "konto_check.lxx"
|
3438
3438
|
DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,int incremental)
|
3439
3439
|
{
|
3440
3440
|
char *ptr,*dptr,*data,*eptr,*prolog,*info,*user_info,*hs=NULL,*info1,*info2,*ci=NULL,name_buffer[LUT_PATH_LEN];
|
@@ -3662,7 +3662,7 @@ DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,
|
|
3662
3662
|
typ1=typ;
|
3663
3663
|
if(lut2_block_status[typ]==OK)continue; /* jeden Block nur einmal einlesen */
|
3664
3664
|
retval=read_lut_block_int(lut,0,typ,&len,&data);
|
3665
|
-
#line 4221 "
|
3665
|
+
#line 4221 "konto_check.lxx"
|
3666
3666
|
|
3667
3667
|
switch(retval){
|
3668
3668
|
case LUT_CRC_ERROR:
|
@@ -3750,7 +3750,7 @@ DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,
|
|
3750
3750
|
if(typ==LUT2_2_NAME || typ==LUT2_2_NAME_KURZ){
|
3751
3751
|
FREE(data);
|
3752
3752
|
i=read_lut_block_int(lut,0,LUT2_2_NAME_NAME_KURZ,&len,&data);
|
3753
|
-
#line 4313 "
|
3753
|
+
#line 4313 "konto_check.lxx"
|
3754
3754
|
if(i==OK){ /* was gefunden; Typ �ndern, dann weiter wie bei OK */
|
3755
3755
|
typ=LUT2_2_NAME_NAME_KURZ;
|
3756
3756
|
typ1=LUT2_NAME_NAME_KURZ;
|
@@ -3818,7 +3818,7 @@ DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,
|
|
3818
3818
|
if(!(blz=(int *)calloc(lut2_cnt_hs+1,sizeof(int)))
|
3819
3819
|
|| (!startidx && !(startidx=(int *)calloc(lut2_cnt_hs,sizeof(int)))) /* Index der Hauptstelle in den gro�en Arrays */
|
3820
3820
|
|| (!hs_idx && !(hs_idx=(int *)calloc(lut2_cnt,sizeof(int)))) /* reziprok zu startidx */
|
3821
|
-
|| !(hash=(short int *)calloc(sizeof(short)
|
3821
|
+
|| !(hash=(short int *)calloc(HASH_BUFFER_SIZE,sizeof(short))))
|
3822
3822
|
lut2_block_status[typ]=lut2_block_status[typ1]=ERROR_MALLOC;
|
3823
3823
|
else{
|
3824
3824
|
for(i=0,eptr=data+len;ptr<eptr && i<lut2_cnt_hs;i++){
|
@@ -4346,7 +4346,7 @@ DLL_EXPORT int lut_blocks_id(int mode,int *lut_filename,int *lut_blocks_ok,int *
|
|
4346
4346
|
* ###########################################################################
|
4347
4347
|
*/
|
4348
4348
|
|
4349
|
-
#line 4909 "
|
4349
|
+
#line 4909 "konto_check.lxx"
|
4350
4350
|
DLL_EXPORT const char *current_lutfile_name(int *set,int *level,int *retval)
|
4351
4351
|
{
|
4352
4352
|
if(init_status<7 || !current_lutfile){
|
@@ -5100,7 +5100,7 @@ static int iban_init(void)
|
|
5100
5100
|
* ###########################################################################
|
5101
5101
|
*/
|
5102
5102
|
|
5103
|
-
#line 5663 "
|
5103
|
+
#line 5663 "konto_check.lxx"
|
5104
5104
|
static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_version,RETVAL *retvals)
|
5105
5105
|
{
|
5106
5106
|
char tmp_buffer[16];
|
@@ -8067,8 +8067,16 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8067
8067
|
/* Deutsche Bundesbank */
|
8068
8068
|
case 42:
|
8069
8069
|
|
8070
|
-
/*
|
8071
|
-
if(
|
8070
|
+
/* ab Dezember 2016 sind auch 10-stellige Konten der Form nnn4400001 bis nnn4499999 zul�ssig */
|
8071
|
+
if(k1>=10){ /* 10-stellige Kontonummern ab Dezember 2016 */
|
8072
|
+
if(kto[3]=='4' && kto[4]=='4' && (kto[5]!='0' || kto[6]!='0' || kto[7]!='0' || kto[8]!='0' || kto[9]!='0'))
|
8073
|
+
return OK;
|
8074
|
+
else
|
8075
|
+
return NO_IBAN_CALCULATION;
|
8076
|
+
}
|
8077
|
+
|
8078
|
+
/* ansonsten sind nur noch 8-stellige Konten freigegeben */
|
8079
|
+
if(k1!=0 || k2<10000000)return NO_IBAN_CALCULATION;
|
8072
8080
|
|
8073
8081
|
/* Konten ohne IBAN-Berechnung: nnn 0 0000 bis nnn 0 0999 */
|
8074
8082
|
if(kto[5]=='0' && kto[6]=='0')return NO_IBAN_CALCULATION;
|
@@ -8777,7 +8785,7 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8777
8785
|
}
|
8778
8786
|
}
|
8779
8787
|
|
8780
|
-
#line
|
8788
|
+
#line 9348 "konto_check.lxx"
|
8781
8789
|
/* Funktion lut_multiple() +���2 */
|
8782
8790
|
/* ###########################################################################
|
8783
8791
|
* # lut_multiple(): Universalfunktion, um zu einer gegebenen Bankleitzahl #
|
@@ -9045,7 +9053,7 @@ DLL_EXPORT int lut_cleanup(void)
|
|
9045
9053
|
FREE(sort_pz_f);
|
9046
9054
|
FREE(sort_plz);
|
9047
9055
|
FREE(sort_iban_regel);
|
9048
|
-
#line
|
9056
|
+
#line 9610 "konto_check.lxx"
|
9049
9057
|
if(name_raw && name_data!=name_raw)
|
9050
9058
|
FREE(name_raw);
|
9051
9059
|
else
|
@@ -9114,7 +9122,7 @@ DLL_EXPORT int lut_cleanup(void)
|
|
9114
9122
|
lut_cleanup(); /* neuer Versuch, aufzur�umen */
|
9115
9123
|
RETURN(INIT_FATAL_ERROR);
|
9116
9124
|
}
|
9117
|
-
#line
|
9125
|
+
#line 9684 "konto_check.lxx"
|
9118
9126
|
init_status&=1;
|
9119
9127
|
init_in_progress=0;
|
9120
9128
|
return OK;
|
@@ -9287,10 +9295,8 @@ static void init_atoi_table(void)
|
|
9287
9295
|
int i,ziffer;
|
9288
9296
|
unsigned long l;
|
9289
9297
|
|
9290
|
-
|
9291
|
-
|
9292
|
-
if(time(NULL)>1441576800 ||0)pz_aenderungen_aktivieren_2015_09=1;
|
9293
|
-
#endif
|
9298
|
+
/* �nderungen zum 06.03.2017 aktivieren */
|
9299
|
+
if(time(NULL)>1488754800 ||0)pz_aenderungen_aktivieren_2017_03=1;
|
9294
9300
|
|
9295
9301
|
/* ung�ltige Ziffern; Blanks und Tabs werden ebenfalls als ung�ltig
|
9296
9302
|
* angesehen(!), da die Stellenzuordnung sonst nicht mehr stimmt. Ausnahme:
|
@@ -9555,7 +9561,7 @@ static void init_atoi_table(void)
|
|
9555
9561
|
lut_block_name2[126]="2. IBAN Regel idx";
|
9556
9562
|
lut_block_name2[127]="2. BIC Hauptst.idx";
|
9557
9563
|
lut_blocklen_max=453;
|
9558
|
-
#line
|
9564
|
+
#line 9924 "konto_check.lxx"
|
9559
9565
|
init_status|=1;
|
9560
9566
|
}
|
9561
9567
|
|
@@ -9615,7 +9621,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
9615
9621
|
|
9616
9622
|
switch(pz_methode){
|
9617
9623
|
|
9618
|
-
#line
|
9624
|
+
#line 9987 "konto_check.lxx"
|
9619
9625
|
/* Berechnungsmethoden 00 bis 09 +���3
|
9620
9626
|
Berechnung nach der Methode 00 +���4 */
|
9621
9627
|
/*
|
@@ -11950,7 +11956,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
11950
11956
|
* ######################################################################
|
11951
11957
|
*/
|
11952
11958
|
|
11953
|
-
#line
|
11959
|
+
#line 11998 "konto_check.lxx"
|
11954
11960
|
case 51:
|
11955
11961
|
if(*(kto+2)=='9'){ /* Ausnahme */
|
11956
11962
|
|
@@ -12212,8 +12218,8 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
12212
12218
|
else
|
12213
12219
|
return FALSE;
|
12214
12220
|
|
12215
|
-
#line
|
12216
|
-
#line
|
12221
|
+
#line 12212 "konto_check.lxx"
|
12222
|
+
#line 12214 "konto_check.lxx"
|
12217
12223
|
/* Berechnung nach der Methode 53 +���4 */
|
12218
12224
|
/*
|
12219
12225
|
* ######################################################################
|
@@ -12512,7 +12518,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
12512
12518
|
* # bewerten. #
|
12513
12519
|
* ######################################################################
|
12514
12520
|
*/
|
12515
|
-
#line
|
12521
|
+
#line 12483 "konto_check.lxx"
|
12516
12522
|
case 57:
|
12517
12523
|
#if DEBUG>0
|
12518
12524
|
if(retvals){
|
@@ -13158,7 +13164,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
13158
13164
|
* # Pr�fzifferberechnung) #
|
13159
13165
|
* ######################################################################
|
13160
13166
|
*/
|
13161
|
-
#line
|
13167
|
+
#line 13063 "konto_check.lxx"
|
13162
13168
|
case 66:
|
13163
13169
|
#if DEBUG>0
|
13164
13170
|
case 2066:
|
@@ -13750,15 +13756,18 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
13750
13756
|
/* Berechnung nach der Methode 74 +���4 */
|
13751
13757
|
/*
|
13752
13758
|
* ######################################################################
|
13753
|
-
* # Berechnung nach der Methode 74 (ge�ndert zum
|
13759
|
+
* # Berechnung nach der Methode 74 (ge�ndert zum 5.12.2016) #
|
13754
13760
|
* ######################################################################
|
13755
13761
|
* # Modulus 10, Gewichtung 2, 1, 2, 1, 2 ff. #
|
13756
13762
|
* # Die Kontonummer (2- bis 10-stellig) ist durch linksb�ndige #
|
13757
13763
|
* # Nullenauff�llung 10-stellig darzustellen. Die 10. Stelle ist #
|
13758
|
-
* # per Definition die Pr�fziffer.
|
13759
|
-
* #
|
13760
|
-
* #
|
13761
|
-
* #
|
13764
|
+
* # per Definition die Pr�fziffer. #
|
13765
|
+
* # #
|
13766
|
+
* # Variante 1: #
|
13767
|
+
* # Die f�r die Berechnung relevanten Stellen werden von rechts nach #
|
13768
|
+
* # links mit den Ziffern 2, 1, 2, 1, 2 ff. multipliziert. Die #
|
13769
|
+
* # weitere Berechnung und die Ergebnisse entsprechen dem Verfahren #
|
13770
|
+
* # 00. #
|
13762
13771
|
* # #
|
13763
13772
|
* # Ausnahme: #
|
13764
13773
|
* # Bei 6-stelligen Kontonummern ist folgende Besonderheit zu #
|
@@ -13767,8 +13776,16 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
13767
13776
|
* # einen Pr�fziffernfehler, so ist eine weitere Berechnung #
|
13768
13777
|
* # vorzunehmen. Hierbei ist die Summe der Produkte auf die n�chste #
|
13769
13778
|
* # Halbdekade hochzurechnen. Die Differenz ist die Pr�fziffer. #
|
13779
|
+
* # #
|
13780
|
+
* # F�hrt die Berechnung nach Variante 1 zu einem Pr�fzifferfehler, #
|
13781
|
+
* # so ist nach Variante 2 zu pr�fen. #
|
13782
|
+
* # #
|
13783
|
+
* # Variante 2: #
|
13784
|
+
* # Modulus 11, Gewichtung 2, 3, 4, 5, 6, 7, 2, 3, 4 #
|
13785
|
+
* # Gewichtung und Berechnung erfolgen nach der Methode 04. #
|
13770
13786
|
* ######################################################################
|
13771
13787
|
*/
|
13788
|
+
|
13772
13789
|
case 74:
|
13773
13790
|
if(kto[0]=='0' && kto[1]=='0' && kto[2]=='0' && kto[3]=='0' && kto[4]=='0'
|
13774
13791
|
&& kto[5]=='0' && kto[6]=='0' && kto[7]=='0' && kto[8]=='0')return INVALID_KTO;
|
@@ -13850,8 +13867,28 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
13850
13867
|
if(pz)pz=10-pz;
|
13851
13868
|
CHECK_PZ10;
|
13852
13869
|
}
|
13853
|
-
|
13854
|
-
|
13870
|
+
|
13871
|
+
#if DEBUG>0
|
13872
|
+
case 3074:
|
13873
|
+
if(retvals){
|
13874
|
+
retvals->methode="74c";
|
13875
|
+
retvals->pz_methode=3074;
|
13876
|
+
}
|
13877
|
+
#endif
|
13878
|
+
pz = (kto[0]-'0') * 4
|
13879
|
+
+ (kto[1]-'0') * 3
|
13880
|
+
+ (kto[2]-'0') * 2
|
13881
|
+
+ (kto[3]-'0') * 7
|
13882
|
+
+ (kto[4]-'0') * 6
|
13883
|
+
+ (kto[5]-'0') * 5
|
13884
|
+
+ (kto[6]-'0') * 4
|
13885
|
+
+ (kto[7]-'0') * 3
|
13886
|
+
+ (kto[8]-'0') * 2;
|
13887
|
+
|
13888
|
+
MOD_11_176; /* pz%=11 */
|
13889
|
+
if(pz)pz=11-pz;
|
13890
|
+
INVALID_PZ10;
|
13891
|
+
CHECK_PZ10;
|
13855
13892
|
|
13856
13893
|
/* Berechnung nach der Methode 75 +���4 */
|
13857
13894
|
/*
|
@@ -15317,9 +15354,6 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
15317
15354
|
retvals->pz_methode=4087;
|
15318
15355
|
}
|
15319
15356
|
#endif
|
15320
|
-
/* die neue Untermethode wird erst ab 7. September 2015 g�ltig */
|
15321
|
-
if(!pz_aenderungen_aktivieren_2015_09)return UNDEFINED_SUBMETHOD;
|
15322
|
-
|
15323
15357
|
pz = (kto[3]-'0') * 7
|
15324
15358
|
+ (kto[4]-'0') * 6
|
15325
15359
|
+ (kto[5]-'0') * 5
|
@@ -16060,7 +16094,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
16060
16094
|
#endif
|
16061
16095
|
for(p1=0,ptr=kto+4,i=0;i<5;ptr--,i++)
|
16062
16096
|
p1+=(*ptr-'0')*w93[i];
|
16063
|
-
|
16097
|
+
*(kto+9)= *(kto+5); /* Pr�fziffer nach Stelle 10 */
|
16064
16098
|
}
|
16065
16099
|
}
|
16066
16100
|
#endif
|
@@ -16794,7 +16828,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
16794
16828
|
else{
|
16795
16829
|
for(p1=0,ptr=kto+4,i=0;i<5;ptr--,i++)
|
16796
16830
|
p1+=(*ptr-'0')*w93[i];
|
16797
|
-
|
16831
|
+
*(kto+9)= *(kto+5); /* Pr�fziffer nach Stelle 10 */
|
16798
16832
|
}
|
16799
16833
|
}
|
16800
16834
|
#endif
|
@@ -20287,6 +20321,95 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
20287
20321
|
if(pz)pz=10-pz;
|
20288
20322
|
CHECK_PZ10;
|
20289
20323
|
|
20324
|
+
/* Berechnung nach der Methode E3 +���4 */
|
20325
|
+
/*
|
20326
|
+
* ######################################################################
|
20327
|
+
* # Berechnung nach der Methode E3 #
|
20328
|
+
* ######################################################################
|
20329
|
+
* # Die Kontonummer ist einschlie�lich der Pr�fziffer 10-stellig, #
|
20330
|
+
* # ggf. ist die Kontonummer f�r die Pr�fzifferberechnung durch #
|
20331
|
+
* # linksb�ndige Auff�llung mit Nullen 10-stellig darzustellen. #
|
20332
|
+
* # #
|
20333
|
+
* # Variante 1: #
|
20334
|
+
* # Modulus 10, Gewichtung 2, 1, 2, 1, 2, 1, 2, 1, 2 #
|
20335
|
+
* # #
|
20336
|
+
* # Die Berechnung erfolgt nach der Methode 00. #
|
20337
|
+
* # F�hrt die Berechnung nach Variante 1 zu einem Pr�fzifferfehler, #
|
20338
|
+
* # so ist nach Variante 2 zu pr�fen. #
|
20339
|
+
* # #
|
20340
|
+
* # Variante 2: #
|
20341
|
+
* # Modulus 10, Gewichtung 2, 1, 2, 1, 2, 1, 2, 1, 2 (modifiziert) #
|
20342
|
+
* # #
|
20343
|
+
* # Die Berechnung erfolgt nach der Methode 21. #
|
20344
|
+
* ######################################################################
|
20345
|
+
*/
|
20346
|
+
|
20347
|
+
case 143:
|
20348
|
+
#if DEBUG>0
|
20349
|
+
if(retvals){
|
20350
|
+
retvals->methode="E3";
|
20351
|
+
retvals->pz_methode=143;
|
20352
|
+
}
|
20353
|
+
#endif
|
20354
|
+
if(!pz_aenderungen_aktivieren_2017_03)return NOT_DEFINED;
|
20355
|
+
|
20356
|
+
/* Variante 1: Berechnung nach der Methode 00 */
|
20357
|
+
#if DEBUG>0
|
20358
|
+
case 1143:
|
20359
|
+
if(retvals){
|
20360
|
+
retvals->methode="E3a";
|
20361
|
+
retvals->pz_methode=1143;
|
20362
|
+
}
|
20363
|
+
#endif
|
20364
|
+
#ifdef __ALPHA
|
20365
|
+
pz = ((kto[0]<'5') ? (kto[0]-'0')*2 : (kto[0]-'0')*2-9)
|
20366
|
+
+ (kto[1]-'0')
|
20367
|
+
+ ((kto[2]<'5') ? (kto[2]-'0')*2 : (kto[2]-'0')*2-9)
|
20368
|
+
+ (kto[3]-'0')
|
20369
|
+
+ ((kto[4]<'5') ? (kto[4]-'0')*2 : (kto[4]-'0')*2-9)
|
20370
|
+
+ (kto[5]-'0')
|
20371
|
+
+ ((kto[6]<'5') ? (kto[6]-'0')*2 : (kto[6]-'0')*2-9)
|
20372
|
+
+ (kto[7]-'0')
|
20373
|
+
+ ((kto[8]<'5') ? (kto[8]-'0')*2 : (kto[8]-'0')*2-9);
|
20374
|
+
#else
|
20375
|
+
pz=(kto[1]-'0')+(kto[3]-'0')+(kto[5]-'0')+(kto[7]-'0');
|
20376
|
+
if(kto[0]<'5')pz+=(kto[0]-'0')*2; else pz+=(kto[0]-'0')*2-9;
|
20377
|
+
if(kto[2]<'5')pz+=(kto[2]-'0')*2; else pz+=(kto[2]-'0')*2-9;
|
20378
|
+
if(kto[4]<'5')pz+=(kto[4]-'0')*2; else pz+=(kto[4]-'0')*2-9;
|
20379
|
+
if(kto[6]<'5')pz+=(kto[6]-'0')*2; else pz+=(kto[6]-'0')*2-9;
|
20380
|
+
if(kto[8]<'5')pz+=(kto[8]-'0')*2; else pz+=(kto[8]-'0')*2-9;
|
20381
|
+
#endif
|
20382
|
+
MOD_10_80; /* pz%=10 */
|
20383
|
+
if(pz)pz=10-pz;
|
20384
|
+
CHECK_PZX10;
|
20385
|
+
|
20386
|
+
/* Variante 2: Berechnung nach der Methode 21 */
|
20387
|
+
#if DEBUG>0
|
20388
|
+
case 2143:
|
20389
|
+
if(retvals){
|
20390
|
+
retvals->methode="E3b";
|
20391
|
+
retvals->pz_methode=2143;
|
20392
|
+
}
|
20393
|
+
#endif
|
20394
|
+
|
20395
|
+
pz = (kto[0]-'0') * 2
|
20396
|
+
+ (kto[1]-'0')
|
20397
|
+
+ (kto[2]-'0') * 2
|
20398
|
+
+ (kto[3]-'0')
|
20399
|
+
+ (kto[4]-'0') * 2
|
20400
|
+
+ (kto[5]-'0')
|
20401
|
+
+ (kto[6]-'0') * 2
|
20402
|
+
+ (kto[7]-'0')
|
20403
|
+
+ (kto[8]-'0') * 2;
|
20404
|
+
|
20405
|
+
if(pz>=80)pz=pz-80+8;
|
20406
|
+
if(pz>=40)pz=pz-40+4;
|
20407
|
+
if(pz>=20)pz=pz-20+2;
|
20408
|
+
if(pz>=10)pz=pz-10+1;
|
20409
|
+
if(pz>=10)pz=pz-10+1;
|
20410
|
+
if(pz)pz=10-pz;
|
20411
|
+
CHECK_PZ10;
|
20412
|
+
|
20290
20413
|
/* nicht abgedeckte F�lle +���3 */
|
20291
20414
|
/*
|
20292
20415
|
* ######################################################################
|
@@ -20304,7 +20427,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
20304
20427
|
return NOT_IMPLEMENTED;
|
20305
20428
|
}
|
20306
20429
|
}
|
20307
|
-
#line
|
20430
|
+
#line 19159 "konto_check.lxx"
|
20308
20431
|
|
20309
20432
|
/*
|
20310
20433
|
* ######################################################################
|
@@ -20402,7 +20525,7 @@ DLL_EXPORT int kto_check_blz(char *blz,char *kto)
|
|
20402
20525
|
#if DEBUG>0 /* es werden einige Funktionen benutzt, die nur in der Debug-Variante enthalten sind */
|
20403
20526
|
DLL_EXPORT int kto_check_regel_dbg(char *blz,char *kto,char *blz2,char *kto2,const char **bic,int *regel,RETVAL *retvals)
|
20404
20527
|
{
|
20405
|
-
#line
|
20528
|
+
#line 19257 "konto_check.lxx"
|
20406
20529
|
char *blz_o,buffer[32],kto_o[16],*blz_n,*kto_n,*ptr,*dptr;
|
20407
20530
|
const char *bicp;
|
20408
20531
|
int ret,ret_regel,r;
|
@@ -20450,7 +20573,7 @@ DLL_EXPORT int kto_check_regel_dbg(char *blz,char *kto,char *blz2,char *kto2,con
|
|
20450
20573
|
}
|
20451
20574
|
else /* BLZ und Kto gleich */
|
20452
20575
|
return ret;
|
20453
|
-
#line
|
20576
|
+
#line 19305 "konto_check.lxx"
|
20454
20577
|
}
|
20455
20578
|
|
20456
20579
|
#else /* !DEBUG */
|
@@ -20600,7 +20723,7 @@ DLL_EXPORT int kto_check_blz_dbg(char *blz,char *kto,RETVAL *retvals)
|
|
20600
20723
|
* # Copyright (C) 2007 Michael Plugge <m.plugge@hs-mannheim.de> #
|
20601
20724
|
* ###########################################################################
|
20602
20725
|
*/
|
20603
|
-
#line
|
20726
|
+
#line 19455 "konto_check.lxx"
|
20604
20727
|
DLL_EXPORT int kto_check_pz_dbg(char *pz,char *kto,char *blz,RETVAL *retvals)
|
20605
20728
|
{
|
20606
20729
|
int untermethode,pz_methode;
|
@@ -20836,7 +20959,7 @@ DLL_EXPORT int get_lut_info2_b(char *lutname,int *version,char **prolog_p,char *
|
|
20836
20959
|
}
|
20837
20960
|
else
|
20838
20961
|
**user_info_p=0;
|
20839
|
-
#line
|
20962
|
+
#line 19676 "konto_check.lxx"
|
20840
20963
|
FREE(prolog);
|
20841
20964
|
return OK;
|
20842
20965
|
}
|
@@ -20972,23 +21095,23 @@ DLL_EXPORT const char *get_kto_check_version_x(int mode)
|
|
20972
21095
|
return __DATE__ ", " __TIME__; /* Compilierdatum und -zeit */
|
20973
21096
|
case 4: /* Datum der Pr�fziffermethode */
|
20974
21097
|
#if 1
|
20975
|
-
if(
|
20976
|
-
return "
|
21098
|
+
if(pz_aenderungen_aktivieren_2017_03)
|
21099
|
+
return "06.03.2017";
|
20977
21100
|
else
|
20978
|
-
return "
|
21101
|
+
return "05.12.2016 (Aenderungen vom 06.03.2017 enthalten aber noch nicht aktiviert)";
|
20979
21102
|
#else
|
20980
|
-
return "
|
21103
|
+
return "06.03.2017";
|
20981
21104
|
#endif
|
20982
21105
|
case 5:
|
20983
|
-
return "
|
21106
|
+
return "05.12.2016";
|
20984
21107
|
case 6:
|
20985
|
-
return "
|
21108
|
+
return "3. M�rz 2017"; /* Klartext-Datum der Bibliotheksversion */
|
20986
21109
|
case 7:
|
20987
21110
|
return "final"; /* Versions-Typ der Bibliotheksversion (development, beta, final) */
|
20988
21111
|
case 8:
|
20989
21112
|
return "5"; /* Hauptversionszahl */
|
20990
21113
|
case 9:
|
20991
|
-
return "
|
21114
|
+
return "10"; /* Unterversionszahl */
|
20992
21115
|
}
|
20993
21116
|
}
|
20994
21117
|
|
@@ -21134,7 +21257,7 @@ DLL_EXPORT int dump_lutfile(char *outputname,UINT4 *required)
|
|
21134
21257
|
default:
|
21135
21258
|
break;
|
21136
21259
|
}
|
21137
|
-
#line
|
21260
|
+
#line 19913 "konto_check.lxx"
|
21138
21261
|
fputc('\n',out);
|
21139
21262
|
while(--i)fputc('=',out);
|
21140
21263
|
fputc('\n',out);
|
@@ -21270,7 +21393,7 @@ DLL_EXPORT int rebuild_blzfile(char *inputname,char *outputname,UINT4 set)
|
|
21270
21393
|
}
|
21271
21394
|
else /* set-Parameter 1 oder 2: LUT-Datei als Eingabedatei */
|
21272
21395
|
if(set>2)set=2; /* set darf nur 0, 1 oder 2 sein; 0 wurde schon behandelt, negative Werte gibt es nicht (UINT4 Parameter) */
|
21273
|
-
|
21396
|
+
if((ret=kto_check_init_p(inputname,9,set,0))<=0)RETURN(ret);
|
21274
21397
|
|
21275
21398
|
if(!(out=fopen(outputname,"w"))){
|
21276
21399
|
PRINT_VERBOSE_DEBUG_FILE("fopen");
|
@@ -21459,7 +21582,7 @@ DLL_EXPORT const char *iban2bic_id(char *iban,int *retval,int *blz,int *kto)
|
|
21459
21582
|
return iban2bic(iban,retval,b,k);
|
21460
21583
|
}
|
21461
21584
|
|
21462
|
-
#line
|
21585
|
+
#line 20238 "konto_check.lxx"
|
21463
21586
|
/* Funktion iban_gen(), iban_bic_gen() und iban_bic_gen1 +���1 */
|
21464
21587
|
/* ###########################################################################
|
21465
21588
|
* # Die Funktion iban_gen generiert aus Bankleitzahl und Kontonummer eine #
|
@@ -22292,7 +22415,7 @@ DLL_EXPORT int ipi_check(char *zweck)
|
|
22292
22415
|
* # Copyright (C) 2009,2011 Michael Plugge <m.plugge@hs-mannheim.de> #
|
22293
22416
|
* ###########################################################################
|
22294
22417
|
*/
|
22295
|
-
#line
|
22418
|
+
#line 21071 "konto_check.lxx"
|
22296
22419
|
|
22297
22420
|
/* Funktion volltext_zeichen() +���2 */
|
22298
22421
|
/* Diese Funktion gibt f�r Zeichen die bei der Volltextsuche g�ltig sind
|
@@ -23084,11 +23207,12 @@ static int binary_search(char *a,char **base,int *sort_a,int cnt,int *unten,int
|
|
23084
23207
|
l=x+1;
|
23085
23208
|
x=(l+r)/2;
|
23086
23209
|
}
|
23087
|
-
if(y){
|
23210
|
+
if(y){ /* Suchwort im kompletten Bereich nicht gefunden */
|
23088
23211
|
*unten=*anzahl=0;
|
23089
23212
|
return KEY_NOT_FOUND;
|
23090
23213
|
}
|
23091
23214
|
|
23215
|
+
/* Grenzen nach unten und oben bestimmen */
|
23092
23216
|
for(l=x;l>=0 && !(*fkt)(a,base[sort_a[l]]);l--);
|
23093
23217
|
l++;
|
23094
23218
|
*unten=l;
|
@@ -23138,7 +23262,7 @@ static int qcmp_bic_h(const void *ap,const void *bp)
|
|
23138
23262
|
return a-b;
|
23139
23263
|
}
|
23140
23264
|
|
23141
|
-
#line
|
23265
|
+
#line 21918 "konto_check.lxx"
|
23142
23266
|
|
23143
23267
|
/* Funktion qcmp_bic() +���3 */
|
23144
23268
|
static int qcmp_bic(const void *ap,const void *bp)
|
@@ -23243,7 +23367,7 @@ static int qcmp_iban_regel(const void *ap,const void *bp)
|
|
23243
23367
|
else
|
23244
23368
|
return a-b;
|
23245
23369
|
}
|
23246
|
-
#line
|
23370
|
+
#line 21933 "konto_check.lxx"
|
23247
23371
|
|
23248
23372
|
/* Funktion init_blzf() +���2
|
23249
23373
|
* Diese Funktion initialisiert das Array mit den Bankleitzahlen f�r alle
|
@@ -23311,7 +23435,7 @@ DLL_EXPORT int konto_check_idx2blz(int idx,int *zweigstelle,int *retval)
|
|
23311
23435
|
}
|
23312
23436
|
|
23313
23437
|
/* Funktion suche_int1() +���2 */
|
23314
|
-
#line
|
23438
|
+
#line 22001 "konto_check.lxx"
|
23315
23439
|
static int suche_int1(int a1,int a2,int *anzahl,int **start_idx,int **zweigstellen_base,int **blz_base,
|
23316
23440
|
int **base_name,int **base_sort,int(*cmp)(const void *, const void *),int cnt,int such_idx)
|
23317
23441
|
{
|
@@ -23362,7 +23486,7 @@ static int suche_int1(int a1,int a2,int *anzahl,int **start_idx,int **zweigstell
|
|
23362
23486
|
}
|
23363
23487
|
|
23364
23488
|
/* Funktion suche_int2() +���2 */
|
23365
|
-
#line
|
23489
|
+
#line 22052 "konto_check.lxx"
|
23366
23490
|
static int suche_int2(int a1,int a2,int *anzahl,int **start_idx,int **zweigstellen_base,int **blz_base,
|
23367
23491
|
int **base_name,int **base_sort,int(*cmp)(const void *, const void *),int such_idx,int pz_suche)
|
23368
23492
|
{
|
@@ -23527,7 +23651,7 @@ static int *lut_suche_multiple_and(int *such_array,int *start1,int cnt1,int *sta
|
|
23527
23651
|
|
23528
23652
|
if(cnt)*cnt=lut2_cnt;
|
23529
23653
|
if(!such_array){
|
23530
|
-
if(!(such_array=(int *)calloc(sizeof(int)
|
23654
|
+
if(!(such_array=(int *)calloc(lut2_cnt,sizeof(int)))){
|
23531
23655
|
if(retval)*retval=ERROR_MALLOC;
|
23532
23656
|
return NULL;
|
23533
23657
|
}
|
@@ -23592,8 +23716,8 @@ DLL_EXPORT int lut_suche_init(int uniq)
|
|
23592
23716
|
int i,id;
|
23593
23717
|
LUT_SUCHE_ARR *a;
|
23594
23718
|
|
23595
|
-
if(!(a=(LUT_SUCHE_ARR *)calloc(sizeof(LUT_SUCHE_ARR)
|
23596
|
-
if(!lut_suche_arr && !(lut_suche_arr=(LUT_SUCHE_ARR **)calloc(sizeof(LUT_SUCHE_ARR*)
|
23719
|
+
if(!(a=(LUT_SUCHE_ARR *)calloc(1,sizeof(LUT_SUCHE_ARR))))return ERROR_MALLOC;
|
23720
|
+
if(!lut_suche_arr && !(lut_suche_arr=(LUT_SUCHE_ARR **)calloc(last_lut_suche_idx=100,sizeof(LUT_SUCHE_ARR*))))return ERROR_MALLOC;
|
23597
23721
|
for(i=id=0;i<last_lut_suche_idx;i++)if(!lut_suche_arr[i]){ /* freien Index suchen */
|
23598
23722
|
id=i;
|
23599
23723
|
break;
|
@@ -23805,6 +23929,41 @@ DLL_EXPORT int lut_suche(int such_id,char *such_cmd,UINT4 *such_cnt,UINT4 **fili
|
|
23805
23929
|
else
|
23806
23930
|
return OK;
|
23807
23931
|
}
|
23932
|
+
#if 0
|
23933
|
+
/* Funktion lut_suche_namen_re() +���2 */
|
23934
|
+
DLL_EXPORT int lut_suche_namen_re(char *such_str,int *anzahl,int **start_idx,int **zweigstellen_base,
|
23935
|
+
char ***base_name,int **blz_base)
|
23936
|
+
//#error lut_suche_namen_re hier; zun�chst mal die Suche nach Namen, dann erst Volltext etc.
|
23937
|
+
{
|
23938
|
+
if(anzahl)*anzahl=0;
|
23939
|
+
if((init_status&7)<7)return LUT2_NOT_INITIALIZED;
|
23940
|
+
if(lut_id_status==FALSE)return LUT1_FILE_USED;
|
23941
|
+
if(!name)return LUT2_NAME_NOT_INITIALIZED;
|
23942
|
+
if(base_name)*base_name=name;
|
23943
|
+
{
|
23944
|
+
typedef struct{
|
23945
|
+
char *pbuffer;
|
23946
|
+
int *cnt1;
|
23947
|
+
int *cnt2;
|
23948
|
+
int *special;
|
23949
|
+
char *regexp;
|
23950
|
+
int caseless;
|
23951
|
+
int pcre;
|
23952
|
+
int re_last_index;
|
23953
|
+
} MATCH_CTX;
|
23954
|
+
|
23955
|
+
char *buf;
|
23956
|
+
int i,j;
|
23957
|
+
MATCH_CTX mctx;
|
23958
|
+
|
23959
|
+
buf=calloc(500,sizeof(int));
|
23960
|
+
for (i=j=0;i<500;i++)if(match(such_str,base_name[i],&mctx))buf[j++]=i;
|
23961
|
+
}
|
23962
|
+
|
23963
|
+
fprintf(stderr,"Suchstring: %s\n",such_str);
|
23964
|
+
// return suche_str(such_str,anzahl,start_idx,zweigstellen_base,blz_base,&name,&sort_name,qcmp_name,LUT2_NAME_SORT);
|
23965
|
+
}
|
23966
|
+
#endif
|
23808
23967
|
|
23809
23968
|
/* Funktion lut_suche_multiple() +���2 */
|
23810
23969
|
DLL_EXPORT int lut_suche_multiple(char *such_str,int uniq,char *such_cmd,UINT4 *anzahl,UINT4 **zweigstellen,UINT4 **blz)
|
@@ -23846,8 +24005,9 @@ DLL_EXPORT int lut_suche_multiple(char *such_str,int uniq,char *such_cmd,UINT4 *
|
|
23846
24005
|
}
|
23847
24006
|
else
|
23848
24007
|
idx=j;
|
24008
|
+
//#error volltext_zeichen() nur bei suche_volltext???
|
23849
24009
|
while(volltext_zeichen(UCPP &ptr))ptr++;
|
23850
|
-
typ=LUT_SUCHE_VOLLTEXT;
|
24010
|
+
typ=LUT_SUCHE_VOLLTEXT; /* Default-Einstellung */
|
23851
24011
|
i1=i2=0;
|
23852
24012
|
if(*ptr=='-'){ /* Bereich (f�r numerische Suche) angegeben */
|
23853
24013
|
pi2=++ptr;
|
@@ -23941,7 +24101,7 @@ static int cmp_suche_sort(const void *ap,const void *bp)
|
|
23941
24101
|
DLL_EXPORT int lut_suche_sort1(int anzahl,int *blz_base,int *zweigstellen_base,int *idx,int *anzahl_o,int **idx_op,int **cnt_op,int uniq)
|
23942
24102
|
{
|
23943
24103
|
int i,j,last_idx,*idx_a,*cnt_o;
|
23944
|
-
#line
|
24104
|
+
#line 22668 "konto_check.lxx"
|
23945
24105
|
|
23946
24106
|
if(idx_op)*idx_op=NULL;
|
23947
24107
|
if(cnt_op)*cnt_op=NULL;
|
@@ -24023,7 +24183,7 @@ DLL_EXPORT int lut_suche_sort2(int anzahl,int *blz,int *zweigstellen,int *anzahl
|
|
24023
24183
|
return OK;
|
24024
24184
|
}
|
24025
24185
|
|
24026
|
-
#line
|
24186
|
+
#line 22751 "konto_check.lxx"
|
24027
24187
|
/* Funktion lut_suche_volltext() +���2 */
|
24028
24188
|
DLL_EXPORT int lut_suche_volltext(char *such_wort,int *anzahl,int *base_name_idx,char ***base_name,
|
24029
24189
|
int *zweigstellen_anzahl,int **start_idx,int **zweigstellen_base,int **blz_base)
|
@@ -24153,7 +24313,7 @@ DLL_EXPORT int lut_suche_blz(int such1,int such2,int *anzahl,int **start_idx,int
|
|
24153
24313
|
return suche_int1(such1,such2,anzahl,start_idx,zweigstellen_base,blz_base,&blz_f,&sort_blz,qcmp_blz,cnt,0);
|
24154
24314
|
}
|
24155
24315
|
|
24156
|
-
#line
|
24316
|
+
#line 22901 "konto_check.lxx"
|
24157
24317
|
/* Funktion lut_suche_bic() +���2 */
|
24158
24318
|
DLL_EXPORT int lut_suche_bic(char *such_name,int *anzahl,int **start_idx,int **zweigstellen_base,
|
24159
24319
|
char ***base_name,int **blz_base)
|
@@ -24244,7 +24404,7 @@ DLL_EXPORT int lut_suche_regel(int such1,int such2,int *anzahl,int **start_idx,i
|
|
24244
24404
|
return suche_int2(such1*100,such2*100+99,anzahl,start_idx,zweigstellen_base,blz_base,&iban_regel,&sort_iban_regel,qcmp_iban_regel,LUT2_IBAN_REGEL_SORT,0);
|
24245
24405
|
}
|
24246
24406
|
|
24247
|
-
#line
|
24407
|
+
#line 22934 "konto_check.lxx"
|
24248
24408
|
|
24249
24409
|
/* Funktion lut_suche_bic_h() +���2 */
|
24250
24410
|
DLL_EXPORT int lut_suche_bic_h(char *such_name,int *anzahl,int **start_idx,int **zweigstellen_base,
|
@@ -24630,7 +24790,7 @@ DLL_EXPORT const char *iban_ort(char *iban,int filiale,int*retval)
|
|
24630
24790
|
{
|
24631
24791
|
return iban_fkt_s(iban,filiale,retval,lut_ort);
|
24632
24792
|
}
|
24633
|
-
#line
|
24793
|
+
#line 23023 "konto_check.lxx"
|
24634
24794
|
|
24635
24795
|
static int bic_fkt_c(char *bic1,int mode,int filiale,int *retval,char *base,int error)
|
24636
24796
|
{
|
@@ -25575,7 +25735,7 @@ static int convert_encoding(char **data,UINT4 *len)
|
|
25575
25735
|
DLL_EXPORT const char *pz2str(int pz,int *ret)
|
25576
25736
|
{
|
25577
25737
|
if(ret){
|
25578
|
-
if(pz%1000>=
|
25738
|
+
if(pz%1000>=144)
|
25579
25739
|
*ret=NOT_DEFINED;
|
25580
25740
|
else
|
25581
25741
|
*ret=OK;
|
@@ -25724,6 +25884,7 @@ DLL_EXPORT const char *pz2str(int pz,int *ret)
|
|
25724
25884
|
case 140: return "E0";
|
25725
25885
|
case 141: return "E1";
|
25726
25886
|
case 142: return "E2";
|
25887
|
+
case 143: return "E3";
|
25727
25888
|
case 1013: return "13a";
|
25728
25889
|
case 1049: return "49a";
|
25729
25890
|
case 1050: return "50a";
|
@@ -25789,6 +25950,7 @@ DLL_EXPORT const char *pz2str(int pz,int *ret)
|
|
25789
25950
|
case 1136: return "D6a";
|
25790
25951
|
case 1138: return "D8a";
|
25791
25952
|
case 1139: return "D9a";
|
25953
|
+
case 1143: return "E3a";
|
25792
25954
|
case 2013: return "13b";
|
25793
25955
|
case 2049: return "49b";
|
25794
25956
|
case 2050: return "50b";
|
@@ -25854,10 +26016,12 @@ DLL_EXPORT const char *pz2str(int pz,int *ret)
|
|
25854
26016
|
case 2136: return "D6b";
|
25855
26017
|
case 2138: return "D8b";
|
25856
26018
|
case 2139: return "D9b";
|
26019
|
+
case 2143: return "E3b";
|
25857
26020
|
case 3051: return "51c";
|
25858
26021
|
case 3057: return "57c";
|
25859
26022
|
case 3068: return "68c";
|
25860
26023
|
case 3073: return "73c";
|
26024
|
+
case 3074: return "74c";
|
25861
26025
|
case 3075: return "75c";
|
25862
26026
|
case 3080: return "80c";
|
25863
26027
|
case 3081: return "81c";
|
@@ -25910,7 +26074,7 @@ DLL_EXPORT const char *pz2str(int pz,int *ret)
|
|
25910
26074
|
default: return "???";
|
25911
26075
|
}
|
25912
26076
|
}
|
25913
|
-
#line
|
26077
|
+
#line 23978 "konto_check.lxx"
|
25914
26078
|
|
25915
26079
|
/* Funktion lut_keine_iban_berechnung() +���1 */
|
25916
26080
|
/*
|
@@ -26025,7 +26189,7 @@ DLL_EXPORT int lut_keine_iban_berechnung(char *iban_blacklist,char *lutfile,int
|
|
26025
26189
|
/* Funktion pz_aenderungen_enable() +���1 */
|
26026
26190
|
/* ###########################################################################
|
26027
26191
|
* # Die Funktion pz_aenderungen_enable() dient dazu, den Status des Flags #
|
26028
|
-
* #
|
26192
|
+
* # pz_aenderungen_aktivieren_2017_03 abzufragen bzw. zu setzen. Falls die Variable #
|
26029
26193
|
* # set 1 ist, werden die �nderungen aktiviert, falls sie 0 ist, werden #
|
26030
26194
|
* # die �nderungen deaktiviert. Bei allen anderen Werten wird das aktuelle #
|
26031
26195
|
* # Flag nicht ver�ndert, sondern nur der Status zur�ckgegeben. #
|
@@ -26041,8 +26205,8 @@ DLL_EXPORT int lut_keine_iban_berechnung(char *iban_blacklist,char *lutfile,int
|
|
26041
26205
|
|
26042
26206
|
DLL_EXPORT int pz_aenderungen_enable(int set)
|
26043
26207
|
{
|
26044
|
-
if(set==0 || set==1)
|
26045
|
-
return
|
26208
|
+
if(set==0 || set==1)pz_aenderungen_aktivieren_2017_03=set;
|
26209
|
+
return pz_aenderungen_aktivieren_2017_03;
|
26046
26210
|
}
|
26047
26211
|
|
26048
26212
|
#if DEBUG>0
|
@@ -26074,7 +26238,7 @@ DLL_EXPORT char *kto_check_test_vars(char *txt,UINT4 i)
|
|
26074
26238
|
#endif
|
26075
26239
|
|
26076
26240
|
|
26077
|
-
#line
|
26241
|
+
#line 24142 "konto_check.lxx"
|
26078
26242
|
/* Funktionen *_id() +���1 */
|
26079
26243
|
/* ###########################################################################
|
26080
26244
|
* # Die folgenden Funktionen sind die id-Varianten von Funktionen, die #
|
@@ -26261,7 +26425,7 @@ static int kc_ptr2id(char *ptr,int *handle,int release_mem)
|
|
26261
26425
|
|
26262
26426
|
*handle=-1; /* f�r evl. malloc-Fehler vorbelegen */
|
26263
26427
|
if(!h_cnt){
|
26264
|
-
if(!(handle_ptr=(char **)calloc(sizeof(char*)
|
26428
|
+
if(!(handle_ptr=(char **)calloc(HANDLE_CNT_INCREMENT,sizeof(char*))) || !(handle_free=(int*)calloc(HANDLE_CNT_INCREMENT,sizeof(int))))return ERROR_MALLOC;
|
26265
26429
|
h_cnt=HANDLE_CNT_INCREMENT;
|
26266
26430
|
}
|
26267
26431
|
if(!release_mem) /* Handle f�r fixen String, suchen ob er schon vergeben wurde */
|
@@ -10,7 +10,7 @@
|
|
10
10
|
* # Verwendung in anderen Programmen bzw. Programmiersprachen benutzt #
|
11
11
|
* # werden. #
|
12
12
|
* # #
|
13
|
-
* # Copyright (C) 2002-
|
13
|
+
* # Copyright (C) 2002-2017 Michael Plugge <m.plugge@hs-mannheim.de> #
|
14
14
|
* # #
|
15
15
|
* # Dieses Programm ist freie Software; Sie d�rfen es unter den #
|
16
16
|
* # Bedingungen der GNU Lesser General Public License, wie von der Free #
|
@@ -77,7 +77,10 @@
|
|
77
77
|
* einige Arrays damit initialisiert werden.
|
78
78
|
*/
|
79
79
|
|
80
|
-
#
|
80
|
+
#ifndef DEFAULT_ENCODING
|
81
|
+
# define DEFAULT_ENCODING 1
|
82
|
+
#endif
|
83
|
+
|
81
84
|
#define KEEP_RAW_DATA 1
|
82
85
|
|
83
86
|
/*
|
@@ -328,6 +331,8 @@ extern const char *lut2_feld_namen[256];
|
|
328
331
|
*/
|
329
332
|
|
330
333
|
#undef FALSE
|
334
|
+
#define INVALID_REGULAR_EXPRESSION_CNT -152
|
335
|
+
#define INVALID_REGULAR_EXPRESSION -151
|
331
336
|
#define INVALID_HANDLE -150
|
332
337
|
#define INVALID_BIQ_INDEX -149
|
333
338
|
#define ARRAY_INDEX_OUT_OF_RANGE -148
|
@@ -479,7 +484,7 @@ extern const char *lut2_feld_namen[256];
|
|
479
484
|
#define OK_KTO_REPLACED_NO_PZ 24
|
480
485
|
#define OK_UNTERKONTO_ATTACHED 25
|
481
486
|
#define OK_SHORT_BIC_USED 26
|
482
|
-
#line
|
487
|
+
#line 279 "konto_check_h.lx"
|
483
488
|
|
484
489
|
#define MAX_BLZ_CNT 30000 /* maximale Anzahl BLZ's in generate_lut() */
|
485
490
|
|
@@ -811,7 +811,7 @@ static VALUE lut_blocks_rb(int argc,VALUE* argv,VALUE self)
|
|
811
811
|
*/
|
812
812
|
static VALUE lut_blocks1_rb(int argc,VALUE* argv,VALUE self)
|
813
813
|
{
|
814
|
-
rb_scan_args(argc,argv,"0");
|
814
|
+
rb_scan_args(argc,argv,"0",NULL);
|
815
815
|
return INT2FIX(lut_blocks(0,NULL,NULL,NULL));
|
816
816
|
}
|
817
817
|
|
@@ -4354,11 +4354,11 @@ void Init_konto_check_raw()
|
|
4354
4354
|
/*
|
4355
4355
|
* This is a C/Ruby library to check the validity of German Bank Account
|
4356
4356
|
* Numbers. All currently defined test methods by Deutsche Bundesbank
|
4357
|
-
* (00 to
|
4357
|
+
* (00 to E3) are implemented.
|
4358
4358
|
*
|
4359
4359
|
* <b>ATTENTION:</b> There are a few important changes in the API between
|
4360
4360
|
* version 0.0.2 (version by Peter Horn/Provideal), version 0.0.6 (jeanmartin)
|
4361
|
-
* and this version (V. 5.
|
4361
|
+
* and this version (V. 5.10 from 2017-03-10):
|
4362
4362
|
*
|
4363
4363
|
* * The function KontoCheck::load_bank_data() is no longer used; it is
|
4364
4364
|
* replaced by KontoCheck::init() and KontoCheck::generate_lutfile().
|
@@ -4540,6 +4540,10 @@ void Init_konto_check_raw()
|
|
4540
4540
|
rb_define_module_function(KontoCheck,"load_bank_data",load_bank_data,1);
|
4541
4541
|
|
4542
4542
|
/* Rückgabewerte der konto_check Bibliothek */
|
4543
|
+
/* (-152) Ungültiger Zähler in regulärem Ausdruck (innerhalb von {}) */
|
4544
|
+
rb_define_const(KontoCheck,"INVALID_REGULAR_EXPRESSION_CNT",INT2FIX(INVALID_REGULAR_EXPRESSION_CNT));
|
4545
|
+
/* (-151) Ungültiger regulärer Ausdruck (enthält zwei Zeichen aus [+?*] nacheinander) */
|
4546
|
+
rb_define_const(KontoCheck,"INVALID_REGULAR_EXPRESSION",INT2FIX(INVALID_REGULAR_EXPRESSION));
|
4543
4547
|
/* (-150) Ungültiges Handle angegeben */
|
4544
4548
|
rb_define_const(KontoCheck,"INVALID_HANDLE",INT2FIX(INVALID_HANDLE));
|
4545
4549
|
/* (-149) Ungültiger Index für die biq_*() Funktionen */
|
@@ -48,6 +48,8 @@ DLL_EXPORT const char *kto_check_retval2txt(int retval)
|
|
48
48
|
DLL_EXPORT const char *kto_check_retval2iso(int retval)
|
49
49
|
{
|
50
50
|
switch(retval){
|
51
|
+
case INVALID_REGULAR_EXPRESSION_CNT: return "Ung�ltiger Z�hler in regul�rem Ausdruck (innerhalb von {})";
|
52
|
+
case INVALID_REGULAR_EXPRESSION: return "Ung�ltiger regul�rer Ausdruck (enth�lt zwei Zeichen aus [+?*] nacheinander)";
|
51
53
|
case INVALID_HANDLE: return "Ung�ltiges Handle angegeben";
|
52
54
|
case INVALID_BIQ_INDEX: return "Ung�ltiger Index f�r die biq_*() Funktionen";
|
53
55
|
case ARRAY_INDEX_OUT_OF_RANGE: return "Der Array-Index liegt au�erhalb des g�ltigen Bereichs";
|
@@ -216,6 +218,8 @@ DLL_EXPORT const char *kto_check_retval2iso(int retval)
|
|
216
218
|
DLL_EXPORT const char *kto_check_retval2dos(int retval)
|
217
219
|
{
|
218
220
|
switch(retval){
|
221
|
+
case INVALID_REGULAR_EXPRESSION_CNT: return "Ung�ltiger Z� hler in regul� rem Ausdruck (innerhalb von {})";
|
222
|
+
case INVALID_REGULAR_EXPRESSION: return "Ung�ltiger regul� rer Ausdruck (enth� lt zwei Zeichen aus [+?*] nacheinander)";
|
219
223
|
case INVALID_HANDLE: return "Ung�ltiges Handle angegeben";
|
220
224
|
case INVALID_BIQ_INDEX: return "Ung�ltiger Index f�r die biq_*() Funktionen";
|
221
225
|
case ARRAY_INDEX_OUT_OF_RANGE: return "Der Array-Index liegt au�erhalb des g�ltigen Bereichs";
|
@@ -384,6 +388,8 @@ DLL_EXPORT const char *kto_check_retval2dos(int retval)
|
|
384
388
|
DLL_EXPORT const char *kto_check_retval2html(int retval)
|
385
389
|
{
|
386
390
|
switch(retval){
|
391
|
+
case INVALID_REGULAR_EXPRESSION_CNT: return "Ungültiger Zähler in regulärem Ausdruck (innerhalb von {})";
|
392
|
+
case INVALID_REGULAR_EXPRESSION: return "Ungültiger regulärer Ausdruck (enthält zwei Zeichen aus [+?*] nacheinander)";
|
387
393
|
case INVALID_HANDLE: return "Ungültiges Handle angegeben";
|
388
394
|
case INVALID_BIQ_INDEX: return "Ungültiger Index für die biq_*() Funktionen";
|
389
395
|
case ARRAY_INDEX_OUT_OF_RANGE: return "Der Array-Index liegt außerhalb des gültigen Bereichs";
|
@@ -552,6 +558,8 @@ DLL_EXPORT const char *kto_check_retval2html(int retval)
|
|
552
558
|
DLL_EXPORT const char *kto_check_retval2utf8(int retval)
|
553
559
|
{
|
554
560
|
switch(retval){
|
561
|
+
case INVALID_REGULAR_EXPRESSION_CNT: return "Ungültiger Zähler in regulärem Ausdruck (innerhalb von {})";
|
562
|
+
case INVALID_REGULAR_EXPRESSION: return "Ungültiger regulärer Ausdruck (enthält zwei Zeichen aus [+?*] nacheinander)";
|
555
563
|
case INVALID_HANDLE: return "Ungültiges Handle angegeben";
|
556
564
|
case INVALID_BIQ_INDEX: return "Ungültiger Index für die biq_*() Funktionen";
|
557
565
|
case ARRAY_INDEX_OUT_OF_RANGE: return "Der Array-Index liegt außerhalb des gültigen Bereichs";
|
@@ -720,6 +728,8 @@ DLL_EXPORT const char *kto_check_retval2utf8(int retval)
|
|
720
728
|
DLL_EXPORT const char *kto_check_retval2txt_short(int retval)
|
721
729
|
{
|
722
730
|
switch(retval){
|
731
|
+
case INVALID_REGULAR_EXPRESSION_CNT: return "INVALID_REGULAR_EXPRESSION_CNT";
|
732
|
+
case INVALID_REGULAR_EXPRESSION: return "INVALID_REGULAR_EXPRESSION";
|
723
733
|
case INVALID_HANDLE: return "INVALID_HANDLE";
|
724
734
|
case INVALID_BIQ_INDEX: return "INVALID_BIQ_INDEX";
|
725
735
|
case ARRAY_INDEX_OUT_OF_RANGE: return "ARRAY_INDEX_OUT_OF_RANGE";
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konto_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
5
|
-
prerelease:
|
4
|
+
version: 5.10.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Provideal Systems GmbH
|
@@ -11,22 +10,20 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: thoughtbot-shoulda
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
|
-
- -
|
19
|
+
- - ">="
|
22
20
|
- !ruby/object:Gem::Version
|
23
21
|
version: '0'
|
24
22
|
type: :development
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
|
-
- -
|
26
|
+
- - ">="
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '0'
|
32
29
|
description: Check whether a certain bic/account-no-combination or an IBAN can possibly
|
@@ -42,39 +39,37 @@ extra_rdoc_files:
|
|
42
39
|
- README.textile
|
43
40
|
- ext/konto_check_raw/konto_check_raw_ruby.c
|
44
41
|
files:
|
42
|
+
- LICENSE
|
43
|
+
- README.textile
|
45
44
|
- ext/konto_check_raw/extconf.rb
|
46
45
|
- ext/konto_check_raw/konto_check.c
|
47
46
|
- ext/konto_check_raw/konto_check.h
|
48
47
|
- ext/konto_check_raw/konto_check_raw_ruby.c
|
49
48
|
- ext/konto_check_raw/retvals.h
|
50
49
|
- lib/konto_check.rb
|
51
|
-
- LICENSE
|
52
|
-
- README.textile
|
53
50
|
homepage: http://kontocheck.sourceforge.net
|
54
51
|
licenses: []
|
52
|
+
metadata: {}
|
55
53
|
post_install_message:
|
56
54
|
rdoc_options: []
|
57
55
|
require_paths:
|
58
56
|
- lib
|
59
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
58
|
requirements:
|
62
|
-
- -
|
59
|
+
- - ">="
|
63
60
|
- !ruby/object:Gem::Version
|
64
61
|
version: '0'
|
65
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
63
|
requirements:
|
68
|
-
- -
|
64
|
+
- - ">="
|
69
65
|
- !ruby/object:Gem::Version
|
70
66
|
version: '0'
|
71
67
|
requirements: []
|
72
68
|
rubyforge_project:
|
73
|
-
rubygems_version:
|
69
|
+
rubygems_version: 2.5.2
|
74
70
|
signing_key:
|
75
|
-
specification_version:
|
71
|
+
specification_version: 4
|
76
72
|
summary: Checking german BICs/Bank account numbers and IBANs, generate IBANs, retrieve
|
77
73
|
information about german Banks, search for Banks matching certain criteria, check
|
78
74
|
IBAN or BIC, convert bic/account to IBAN and BIC
|
79
75
|
test_files: []
|
80
|
-
has_rdoc:
|