konto_check 6.01.0 → 6.02.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 +4 -4
- data/ext/konto_check_raw/konto_check.c +80 -159
- data/ext/konto_check_raw/konto_check_raw_ruby.c +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a2b9a4eaf3c213df26bdba2049de70c77dcdba
|
4
|
+
data.tar.gz: d93390ab90f68728cde22531c7d9ff2e6ab9ec38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0316ff43346a0960a890306f58d570a114f58fff702a26f35c3f857c090a6ef39dca17984f6adc58cff4633a8f5ee110afa054daae7976e7d5e4a236a3c403b1
|
7
|
+
data.tar.gz: b504964df3f12767ece6506e9653e4af0e22855ef970937651ceb84a4917023b6f5c92f14afcddef362033b7a2eb453ee07e802007c8c30ddc994906e8b77f2a
|
@@ -45,14 +45,15 @@
|
|
45
45
|
* # im Internet herunterladen. #
|
46
46
|
* ##########################################################################
|
47
47
|
*/
|
48
|
+
#line 332 "ruby/ext/konto_check_raw/konto_check.lxx"
|
48
49
|
|
49
50
|
/* Definitionen und Includes */
|
50
51
|
#ifndef VERSION
|
51
|
-
#define VERSION "6.
|
52
|
+
#define VERSION "6.02 (final)"
|
52
53
|
#define VERSION_MAJOR 6
|
53
|
-
#define VERSION_MINOR
|
54
|
+
#define VERSION_MINOR 02
|
54
55
|
#endif
|
55
|
-
#define VERSION_DATE "2017-
|
56
|
+
#define VERSION_DATE "2017-11-26"
|
56
57
|
|
57
58
|
#ifndef INCLUDE_KONTO_CHECK_DE
|
58
59
|
#define INCLUDE_KONTO_CHECK_DE 1
|
@@ -103,8 +104,8 @@ static lzo_align_t __LZO_MMODEL wrkmem[LZO1X_1_MEM_COMPRESS];
|
|
103
104
|
#define KONTO_CHECK_VARS
|
104
105
|
#include "konto_check.h"
|
105
106
|
|
106
|
-
/* Flag, um die �nderungen zum
|
107
|
-
static int
|
107
|
+
/* Flag, um die �nderungen zum Dezember 2017 zu aktivieren */
|
108
|
+
static int pz_aenderungen_aktivieren_2017_12;
|
108
109
|
|
109
110
|
/* falls die Variable verbose_debug gesetzt wird, werden bei einigen
|
110
111
|
* Funktionen mittels perror() zus�tzliche Debuginfos ausgegeben. Die
|
@@ -241,6 +242,7 @@ static int convert_encoding(char **data,UINT4 *len);
|
|
241
242
|
#define free(ptr) efree(ptr)
|
242
243
|
#endif
|
243
244
|
|
245
|
+
#line 770 "ruby/ext/konto_check_raw/konto_check.lxx"
|
244
246
|
|
245
247
|
/* Testwert zur Markierung ung�ltiger Ziffern im BLZ-String (>8 Stellen) */
|
246
248
|
#define BLZ_FEHLER 100000000
|
@@ -376,6 +378,7 @@ static int convert_encoding(char **data,UINT4 *len);
|
|
376
378
|
*/
|
377
379
|
#define CHECK_RETVAL(fkt) do{if((retval=fkt)!=OK)goto fini;}while(0) /* es mu� noch aufger�umt werden, daher goto */
|
378
380
|
#define CHECK_RETURN(fkt) do{if((retval=fkt)!=OK)return retval;}while(0)
|
381
|
+
#line 911 "ruby/ext/konto_check_raw/konto_check.lxx"
|
379
382
|
|
380
383
|
/* einige Makros zur Umwandlung zwischen unsigned int und char */
|
381
384
|
#define UCP (unsigned char*)
|
@@ -495,6 +498,7 @@ int pz=-777;
|
|
495
498
|
|
496
499
|
#define E_START(x)
|
497
500
|
#define E_END(x)
|
501
|
+
#line 1036 "ruby/ext/konto_check_raw/konto_check.lxx"
|
498
502
|
|
499
503
|
/* Variable f�r die Methoden 27, 29 und 69 */
|
500
504
|
static const int m10h_digits[4][10]={
|
@@ -943,6 +947,7 @@ static int create_lutfile_int(char *name, char *prolog, int slots,FILE **lut)
|
|
943
947
|
* ###########################################################################
|
944
948
|
*/
|
945
949
|
|
950
|
+
#line 1485 "ruby/ext/konto_check_raw/konto_check.lxx"
|
946
951
|
DLL_EXPORT int write_lut_block(char *lutname,UINT4 typ,UINT4 len,char *data)
|
947
952
|
{
|
948
953
|
char buffer[SLOT_BUFFER],*ptr;
|
@@ -980,6 +985,7 @@ DLL_EXPORT int write_lut_block(char *lutname,UINT4 typ,UINT4 len,char *data)
|
|
980
985
|
* #############################################################################
|
981
986
|
*/
|
982
987
|
|
988
|
+
#line 1523 "ruby/ext/konto_check_raw/konto_check.lxx"
|
983
989
|
static int write_lut_block_int(FILE *lut,UINT4 typ,UINT4 len,char *data)
|
984
990
|
{
|
985
991
|
char buffer[SLOT_BUFFER],*ptr,*cptr;
|
@@ -1115,6 +1121,7 @@ static int write_lut_block_int(FILE *lut,UINT4 typ,UINT4 len,char *data)
|
|
1115
1121
|
* ###########################################################################
|
1116
1122
|
*/
|
1117
1123
|
|
1124
|
+
#line 1659 "ruby/ext/konto_check_raw/konto_check.lxx"
|
1118
1125
|
DLL_EXPORT int read_lut_block(char *lutname, UINT4 typ,UINT4 *blocklen,char **data)
|
1119
1126
|
{
|
1120
1127
|
int retval;
|
@@ -1137,6 +1144,7 @@ DLL_EXPORT int read_lut_block(char *lutname, UINT4 typ,UINT4 *blocklen,char **da
|
|
1137
1144
|
* ###########################################################################
|
1138
1145
|
*/
|
1139
1146
|
|
1147
|
+
#line 1683 "ruby/ext/konto_check_raw/konto_check.lxx"
|
1140
1148
|
DLL_EXPORT int read_lut_slot(char *lutname,int slot,UINT4 *blocklen,char **data)
|
1141
1149
|
{
|
1142
1150
|
int retval;
|
@@ -1158,6 +1166,7 @@ DLL_EXPORT int read_lut_slot(char *lutname,int slot,UINT4 *blocklen,char **data)
|
|
1158
1166
|
* ###########################################################################
|
1159
1167
|
*/
|
1160
1168
|
|
1169
|
+
#line 1706 "ruby/ext/konto_check_raw/konto_check.lxx"
|
1161
1170
|
static int read_lut_block_int(FILE *lut,int slot,int typ,UINT4 *blocklen,char **data)
|
1162
1171
|
{
|
1163
1172
|
char buffer[SLOT_BUFFER],*ptr,*sbuffer,*dbuffer;
|
@@ -1247,6 +1256,7 @@ static int read_lut_block_int(FILE *lut,int slot,int typ,UINT4 *blocklen,char **
|
|
1247
1256
|
FREE(sbuffer);
|
1248
1257
|
RETURN(ERROR_MALLOC);
|
1249
1258
|
}
|
1259
|
+
#line 1811 "ruby/ext/konto_check_raw/konto_check.lxx"
|
1250
1260
|
|
1251
1261
|
if(fread(sbuffer,1,compressed_len,lut)<compressed_len){
|
1252
1262
|
FREE(sbuffer);
|
@@ -2839,6 +2849,7 @@ DLL_EXPORT int lut_info_id(char *lut_name,int *info1,int *info2,int *valid1,int
|
|
2839
2849
|
* ###########################################################################
|
2840
2850
|
*/
|
2841
2851
|
|
2852
|
+
#line 3404 "ruby/ext/konto_check_raw/konto_check.lxx"
|
2842
2853
|
DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int *valid2)
|
2843
2854
|
{
|
2844
2855
|
char *ptr,*ptr1,buffer[128];
|
@@ -2926,6 +2937,7 @@ DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int
|
|
2926
2937
|
|
2927
2938
|
/* Infoblocks lesen: 1. Infoblock */
|
2928
2939
|
if((ret=read_lut_block_int(in,0,LUT2_INFO,&cnt,&ptr))==OK){
|
2940
|
+
#line 3493 "ruby/ext/konto_check_raw/konto_check.lxx"
|
2929
2941
|
*(ptr+cnt)=0;
|
2930
2942
|
if(valid1){
|
2931
2943
|
for(ptr1=ptr,v1=v2=0;*ptr1 && *ptr1!='\n' && !isdigit(*ptr1);ptr1++);
|
@@ -2973,6 +2985,7 @@ DLL_EXPORT int lut_info(char *lut_name,char **info1,char **info2,int *valid1,int
|
|
2973
2985
|
|
2974
2986
|
/* Infoblocks lesen: 2. Infoblock */
|
2975
2987
|
if((ret=read_lut_block_int(in,0,LUT2_2_INFO,&cnt,&ptr))==OK){
|
2988
|
+
#line 3542 "ruby/ext/konto_check_raw/konto_check.lxx"
|
2976
2989
|
*(ptr+cnt)=0;
|
2977
2990
|
if(valid2){
|
2978
2991
|
for(ptr1=ptr,v1=v2=0;*ptr1 && *ptr1!='\n' && !isdigit(*ptr1);ptr1++);
|
@@ -3191,6 +3204,7 @@ DLL_EXPORT int copy_lutfile(char *old_name,char *new_name,int new_slots)
|
|
3191
3204
|
qsort(slotdir,slot_cnt,sizeof(int),cmp_int);
|
3192
3205
|
for(last_slot=-1,i=0;i<(int)slot_cnt;i++)if((typ=slotdir[i]) && typ!=(UINT4)last_slot){
|
3193
3206
|
read_lut_block_int(lut1,0,typ,&len,&data);
|
3207
|
+
#line 3762 "ruby/ext/konto_check_raw/konto_check.lxx"
|
3194
3208
|
write_lut_block_int(lut2,typ,len,data);
|
3195
3209
|
FREE(data);
|
3196
3210
|
last_slot=typ;
|
@@ -3420,6 +3434,7 @@ DLL_EXPORT int lut_init(char *lut_name,int required,int set)
|
|
3420
3434
|
* # Copyright (C) 2008 Michael Plugge <m.plugge@hs-mannheim.de> #
|
3421
3435
|
* ###########################################################################
|
3422
3436
|
*/
|
3437
|
+
#line 3992 "ruby/ext/konto_check_raw/konto_check.lxx"
|
3423
3438
|
DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,int incremental)
|
3424
3439
|
{
|
3425
3440
|
char *ptr,*dptr,*data,*eptr,*prolog,*info,*user_info,*hs=NULL,*info1,*info2,*ci=NULL,name_buffer[LUT_PATH_LEN];
|
@@ -3647,6 +3662,7 @@ DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,
|
|
3647
3662
|
typ1=typ;
|
3648
3663
|
if(lut2_block_status[typ]==OK)continue; /* jeden Block nur einmal einlesen */
|
3649
3664
|
retval=read_lut_block_int(lut,0,typ,&len,&data);
|
3665
|
+
#line 4221 "ruby/ext/konto_check_raw/konto_check.lxx"
|
3650
3666
|
|
3651
3667
|
switch(retval){
|
3652
3668
|
case LUT_CRC_ERROR:
|
@@ -3734,6 +3750,7 @@ DLL_EXPORT int kto_check_init(char *lut_name,int *required,int **status,int set,
|
|
3734
3750
|
if(typ==LUT2_2_NAME || typ==LUT2_2_NAME_KURZ){
|
3735
3751
|
FREE(data);
|
3736
3752
|
i=read_lut_block_int(lut,0,LUT2_2_NAME_NAME_KURZ,&len,&data);
|
3753
|
+
#line 4313 "ruby/ext/konto_check_raw/konto_check.lxx"
|
3737
3754
|
if(i==OK){ /* was gefunden; Typ �ndern, dann weiter wie bei OK */
|
3738
3755
|
typ=LUT2_2_NAME_NAME_KURZ;
|
3739
3756
|
typ1=LUT2_NAME_NAME_KURZ;
|
@@ -4329,6 +4346,7 @@ DLL_EXPORT int lut_blocks_id(int mode,int *lut_filename,int *lut_blocks_ok,int *
|
|
4329
4346
|
* ###########################################################################
|
4330
4347
|
*/
|
4331
4348
|
|
4349
|
+
#line 4909 "ruby/ext/konto_check_raw/konto_check.lxx"
|
4332
4350
|
DLL_EXPORT const char *current_lutfile_name(int *set,int *level,int *retval)
|
4333
4351
|
{
|
4334
4352
|
if(init_status<7 || !current_lutfile){
|
@@ -5083,6 +5101,7 @@ static int iban_init(void)
|
|
5083
5101
|
* ###########################################################################
|
5084
5102
|
*/
|
5085
5103
|
|
5104
|
+
#line 5664 "ruby/ext/konto_check_raw/konto_check.lxx"
|
5086
5105
|
static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_version,RETVAL *retvals)
|
5087
5106
|
{
|
5088
5107
|
char tmp_buffer[16];
|
@@ -8155,140 +8174,6 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8155
8174
|
case 45:
|
8156
8175
|
|
8157
8176
|
/* ab September 2017 entf�llt die Regel 45, bleibt jedoch frei */
|
8158
|
-
if(pz_aenderungen_aktivieren_2017_09)return OK;
|
8159
|
-
|
8160
|
-
/* Einer nach der Standard IBAN-Regel ermittelten IBAN ist stets
|
8161
|
-
* der BIC ESSEDE5FXXX zuzuordnen.
|
8162
|
-
*/
|
8163
|
-
if(version<1){
|
8164
|
-
*bicp="ESSEDE5FXXX";
|
8165
|
-
return OK_BLZ_REPLACED;
|
8166
|
-
}
|
8167
|
-
else switch(b){ /* Ab Dezember 2013 wird eine Liste von BLZs angegeben */
|
8168
|
-
case 50210130:
|
8169
|
-
case 50210131:
|
8170
|
-
case 50210132:
|
8171
|
-
case 50210133:
|
8172
|
-
case 50210134:
|
8173
|
-
case 50210135:
|
8174
|
-
case 50210136:
|
8175
|
-
case 50210137:
|
8176
|
-
case 50210138:
|
8177
|
-
case 50210139:
|
8178
|
-
case 50210140:
|
8179
|
-
case 50210141:
|
8180
|
-
case 50210142:
|
8181
|
-
case 50210143:
|
8182
|
-
case 50210144:
|
8183
|
-
case 50210145:
|
8184
|
-
case 50210146:
|
8185
|
-
case 50210147:
|
8186
|
-
case 50210148:
|
8187
|
-
case 50210149:
|
8188
|
-
case 50210150:
|
8189
|
-
case 50210151:
|
8190
|
-
case 50210152:
|
8191
|
-
case 50210153:
|
8192
|
-
case 50210154:
|
8193
|
-
case 50210155:
|
8194
|
-
case 50210156:
|
8195
|
-
case 50210157:
|
8196
|
-
case 50210158:
|
8197
|
-
case 50210159:
|
8198
|
-
case 50210160:
|
8199
|
-
case 50210161:
|
8200
|
-
case 50210162:
|
8201
|
-
case 50210163:
|
8202
|
-
case 50210164:
|
8203
|
-
case 50210165:
|
8204
|
-
case 50210166:
|
8205
|
-
case 50210167:
|
8206
|
-
case 50210168:
|
8207
|
-
case 50210169:
|
8208
|
-
case 50210170:
|
8209
|
-
case 50210171:
|
8210
|
-
case 50210172:
|
8211
|
-
case 50210173:
|
8212
|
-
case 50210174:
|
8213
|
-
case 50210175:
|
8214
|
-
case 50210176:
|
8215
|
-
case 50210177:
|
8216
|
-
case 50210178:
|
8217
|
-
case 50210179:
|
8218
|
-
case 50210180:
|
8219
|
-
case 50210181:
|
8220
|
-
case 50210182:
|
8221
|
-
case 50210183:
|
8222
|
-
case 50210184:
|
8223
|
-
case 50210185:
|
8224
|
-
case 50210186:
|
8225
|
-
case 50210187:
|
8226
|
-
case 50210188:
|
8227
|
-
case 50210189:
|
8228
|
-
case 50510120:
|
8229
|
-
case 50510121:
|
8230
|
-
case 50510122:
|
8231
|
-
case 50510123:
|
8232
|
-
case 50510124:
|
8233
|
-
case 50510125:
|
8234
|
-
case 50510126:
|
8235
|
-
case 50510127:
|
8236
|
-
case 50510128:
|
8237
|
-
case 50510129:
|
8238
|
-
case 50510130:
|
8239
|
-
case 50510131:
|
8240
|
-
case 50510132:
|
8241
|
-
case 50510133:
|
8242
|
-
case 50510134:
|
8243
|
-
case 50510135:
|
8244
|
-
case 50510136:
|
8245
|
-
case 50510137:
|
8246
|
-
case 50510138:
|
8247
|
-
case 50510139:
|
8248
|
-
case 50510140:
|
8249
|
-
case 50510141:
|
8250
|
-
case 50510142:
|
8251
|
-
case 50510143:
|
8252
|
-
case 50510144:
|
8253
|
-
case 50510145:
|
8254
|
-
case 50510146:
|
8255
|
-
case 50510147:
|
8256
|
-
case 50510148:
|
8257
|
-
case 50510149:
|
8258
|
-
case 50510150:
|
8259
|
-
case 50510151:
|
8260
|
-
case 50510152:
|
8261
|
-
case 50510153:
|
8262
|
-
case 50510154:
|
8263
|
-
case 50510155:
|
8264
|
-
case 50510156:
|
8265
|
-
case 50510157:
|
8266
|
-
case 50510158:
|
8267
|
-
case 50510159:
|
8268
|
-
case 50510160:
|
8269
|
-
case 50510161:
|
8270
|
-
case 50510162:
|
8271
|
-
case 50510163:
|
8272
|
-
case 50510164:
|
8273
|
-
case 50510165:
|
8274
|
-
case 50510166:
|
8275
|
-
case 50510167:
|
8276
|
-
case 50510168:
|
8277
|
-
case 50510169:
|
8278
|
-
case 50510170:
|
8279
|
-
case 50510171:
|
8280
|
-
case 50510172:
|
8281
|
-
case 50510173:
|
8282
|
-
case 50510174:
|
8283
|
-
case 50510175:
|
8284
|
-
case 50510176:
|
8285
|
-
case 50510177:
|
8286
|
-
case 50510178:
|
8287
|
-
case 50510179:
|
8288
|
-
case 50510180:
|
8289
|
-
*bicp="ESSEDE5FXXX";
|
8290
|
-
return OK_BLZ_REPLACED;
|
8291
|
-
}
|
8292
8177
|
return OK;
|
8293
8178
|
|
8294
8179
|
|
@@ -8526,9 +8411,12 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8526
8411
|
|
8527
8412
|
/* Iban-Regel 0056.00 +���3 */
|
8528
8413
|
/* Iban-Regel 0056.01 (ab September 2017) +���3 */
|
8414
|
+
/* Iban-Regel 0056.01 (ab Dezember 2017) BLZ 51410111 ung�ltig +���3 */
|
8415
|
+
|
8416
|
+
|
8529
8417
|
/* SEB AG */
|
8530
8418
|
case 56:
|
8531
|
-
if(
|
8419
|
+
if(version<1){
|
8532
8420
|
|
8533
8421
|
/* Spendenkonten: nur mit festgelegten IBANs -> Konto und evl. BLZ/BIC anpassen */
|
8534
8422
|
if(k1==0)switch(k2){
|
@@ -8580,6 +8468,7 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8580
8468
|
}
|
8581
8469
|
|
8582
8470
|
/* f�r die folgenden BLZs sind nur zehnstelllige Kontonummern erlaubt: */
|
8471
|
+
if(pz_aenderungen_aktivieren_2017_12 && b==51410111)return INVALID_BLZ; /* die BLZ wird ab Dezember 2017 ung�ltig */
|
8583
8472
|
switch(b){
|
8584
8473
|
case 10010111:
|
8585
8474
|
case 13010111:
|
@@ -8619,7 +8508,7 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8619
8508
|
case 50510111:
|
8620
8509
|
case 51010111:
|
8621
8510
|
case 51310111:
|
8622
|
-
case 51410111:
|
8511
|
+
case 51410111: /* wird ab Dezember 2017 ung�ltig */
|
8623
8512
|
case 52010111:
|
8624
8513
|
case 54210111:
|
8625
8514
|
case 55010111:
|
@@ -8668,6 +8557,7 @@ static int iban_regel_cvt(char *blz,char *kto,const char **bicp,int regel_versio
|
|
8668
8557
|
}
|
8669
8558
|
}
|
8670
8559
|
|
8560
|
+
#line 9120 "ruby/ext/konto_check_raw/konto_check.lxx"
|
8671
8561
|
/* Funktion lut_multiple() +���2 */
|
8672
8562
|
/* ###########################################################################
|
8673
8563
|
* # lut_multiple(): Universalfunktion, um zu einer gegebenen Bankleitzahl #
|
@@ -8935,6 +8825,7 @@ DLL_EXPORT int lut_cleanup(void)
|
|
8935
8825
|
FREE(sort_pz_f);
|
8936
8826
|
FREE(sort_plz);
|
8937
8827
|
FREE(sort_iban_regel);
|
8828
|
+
#line 9382 "ruby/ext/konto_check_raw/konto_check.lxx"
|
8938
8829
|
if(name_raw && name_data!=name_raw)
|
8939
8830
|
FREE(name_raw);
|
8940
8831
|
else
|
@@ -9003,6 +8894,7 @@ DLL_EXPORT int lut_cleanup(void)
|
|
9003
8894
|
lut_cleanup(); /* neuer Versuch, aufzur�umen */
|
9004
8895
|
RETURN(INIT_FATAL_ERROR);
|
9005
8896
|
}
|
8897
|
+
#line 9456 "ruby/ext/konto_check_raw/konto_check.lxx"
|
9006
8898
|
init_status&=1;
|
9007
8899
|
init_in_progress=0;
|
9008
8900
|
return OK;
|
@@ -9175,8 +9067,8 @@ static void init_atoi_table(void)
|
|
9175
9067
|
int i,ziffer;
|
9176
9068
|
unsigned long l;
|
9177
9069
|
|
9178
|
-
/* �nderungen zum 04.
|
9179
|
-
if(time(NULL)>
|
9070
|
+
/* �nderungen zum 04.12.2017 aktivieren */
|
9071
|
+
if(time(NULL)>1512342000 ||0)pz_aenderungen_aktivieren_2017_12=1;
|
9180
9072
|
|
9181
9073
|
/* ung�ltige Ziffern; Blanks und Tabs werden ebenfalls als ung�ltig
|
9182
9074
|
* angesehen(!), da die Stellenzuordnung sonst nicht mehr stimmt. Ausnahme:
|
@@ -9441,6 +9333,7 @@ static void init_atoi_table(void)
|
|
9441
9333
|
lut_block_name2[126]="2. IBAN Regel idx";
|
9442
9334
|
lut_block_name2[127]="2. BIC Hauptst.idx";
|
9443
9335
|
lut_blocklen_max=453;
|
9336
|
+
#line 9696 "ruby/ext/konto_check_raw/konto_check.lxx"
|
9444
9337
|
init_status|=1;
|
9445
9338
|
}
|
9446
9339
|
|
@@ -9500,6 +9393,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
9500
9393
|
|
9501
9394
|
switch(pz_methode){
|
9502
9395
|
|
9396
|
+
#line 9759 "ruby/ext/konto_check_raw/konto_check.lxx"
|
9503
9397
|
/* Berechnungsmethoden 00 bis 09 +���3
|
9504
9398
|
Berechnung nach der Methode 00 +���4 */
|
9505
9399
|
/*
|
@@ -11834,6 +11728,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
11834
11728
|
* ######################################################################
|
11835
11729
|
*/
|
11836
11730
|
|
11731
|
+
#line 11770 "ruby/ext/konto_check_raw/konto_check.lxx"
|
11837
11732
|
case 51:
|
11838
11733
|
if(*(kto+2)=='9'){ /* Ausnahme */
|
11839
11734
|
|
@@ -12095,6 +11990,8 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
12095
11990
|
else
|
12096
11991
|
return FALSE;
|
12097
11992
|
|
11993
|
+
#line 11984 "ruby/ext/konto_check_raw/konto_check.lxx"
|
11994
|
+
#line 11986 "ruby/ext/konto_check_raw/konto_check.lxx"
|
12098
11995
|
/* Berechnung nach der Methode 53 +���4 */
|
12099
11996
|
/*
|
12100
11997
|
* ######################################################################
|
@@ -12393,6 +12290,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
12393
12290
|
* # bewerten. #
|
12394
12291
|
* ######################################################################
|
12395
12292
|
*/
|
12293
|
+
#line 12255 "ruby/ext/konto_check_raw/konto_check.lxx"
|
12396
12294
|
case 57:
|
12397
12295
|
#if DEBUG>0
|
12398
12296
|
if(retvals){
|
@@ -13038,6 +12936,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
13038
12936
|
* # Pr�fzifferberechnung) #
|
13039
12937
|
* ######################################################################
|
13040
12938
|
*/
|
12939
|
+
#line 12835 "ruby/ext/konto_check_raw/konto_check.lxx"
|
13041
12940
|
case 66:
|
13042
12941
|
#if DEBUG>0
|
13043
12942
|
case 2066:
|
@@ -18374,7 +18273,6 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
18374
18273
|
}
|
18375
18274
|
#endif
|
18376
18275
|
/* Variante 3, g�ltig ab September 2017 */
|
18377
|
-
if(!pz_aenderungen_aktivieren_2017_09)return UNDEFINED_SUBMETHOD;
|
18378
18276
|
pz = (kto[0]-'0') * 4
|
18379
18277
|
+ (kto[1]-'0') * 3
|
18380
18278
|
+ (kto[2]-'0') * 2
|
@@ -20449,6 +20347,7 @@ static int kto_check_int(char *x_blz,int pz_methode,char *kto)
|
|
20449
20347
|
return NOT_IMPLEMENTED;
|
20450
20348
|
}
|
20451
20349
|
}
|
20350
|
+
#line 19049 "ruby/ext/konto_check_raw/konto_check.lxx"
|
20452
20351
|
|
20453
20352
|
/*
|
20454
20353
|
* ######################################################################
|
@@ -20546,9 +20445,10 @@ DLL_EXPORT int kto_check_blz(char *blz,char *kto)
|
|
20546
20445
|
#if DEBUG>0 /* es werden einige Funktionen benutzt, die nur in der Debug-Variante enthalten sind */
|
20547
20446
|
DLL_EXPORT int kto_check_regel_dbg(char *blz,char *kto,char *blz2,char *kto2,const char **bic,int *regel,RETVAL *retvals)
|
20548
20447
|
{
|
20448
|
+
#line 19147 "ruby/ext/konto_check_raw/konto_check.lxx"
|
20549
20449
|
char *blz_o,buffer[32],kto_o[16],*blz_n,*kto_n,*ptr,*dptr;
|
20550
20450
|
const char *bicp;
|
20551
|
-
int ret,ret_regel,r;
|
20451
|
+
int ret,ret_regel,r,i;
|
20552
20452
|
|
20553
20453
|
if(regel)*regel=0;
|
20554
20454
|
if(blz2 && kto2){
|
@@ -20560,7 +20460,8 @@ DLL_EXPORT int kto_check_regel_dbg(char *blz,char *kto,char *blz2,char *kto2,con
|
|
20560
20460
|
kto_n=buffer+10;
|
20561
20461
|
}
|
20562
20462
|
memcpy(blz_n,blz,9);
|
20563
|
-
for(ptr=kto;*ptr;ptr++); /* Ende von kto suchen */
|
20463
|
+
for(ptr=kto,i=0;*ptr && i++<10;ptr++); /* Ende von kto suchen (maximal 10 Stellen) */
|
20464
|
+
if(*ptr)return INVALID_KTO_LENGTH;
|
20564
20465
|
ptr--;
|
20565
20466
|
memcpy(kto_n,"0000000000",10);
|
20566
20467
|
kto_n[10]=0;
|
@@ -20593,6 +20494,7 @@ DLL_EXPORT int kto_check_regel_dbg(char *blz,char *kto,char *blz2,char *kto2,con
|
|
20593
20494
|
}
|
20594
20495
|
else /* BLZ und Kto gleich */
|
20595
20496
|
return ret;
|
20497
|
+
#line 19196 "ruby/ext/konto_check_raw/konto_check.lxx"
|
20596
20498
|
}
|
20597
20499
|
|
20598
20500
|
#else /* !DEBUG */
|
@@ -20603,10 +20505,11 @@ DLL_EXPORT int kto_check_regel(char *blz,char *kto)
|
|
20603
20505
|
{
|
20604
20506
|
char *blz_o,blz_n[10],kto_o[16],kto_n[16],*ptr,*dptr;
|
20605
20507
|
const char *bicp;
|
20606
|
-
int ret,ret_regel,regel;
|
20508
|
+
int ret,ret_regel,regel,i;
|
20607
20509
|
|
20608
20510
|
memcpy(blz_n,blz,9);
|
20609
|
-
for(ptr=kto;*ptr;ptr++); /* Ende von kto suchen */
|
20511
|
+
for(ptr=kto,i=0;*ptr && i++<10;ptr++); /* Ende von kto suchen (maximal 10 Stellen) */
|
20512
|
+
if(*ptr)return INVALID_KTO_LENGTH;
|
20610
20513
|
ptr--;
|
20611
20514
|
memcpy(kto_n,"0000000000",10);
|
20612
20515
|
kto_n[10]=0;
|
@@ -20742,6 +20645,7 @@ DLL_EXPORT int kto_check_blz_dbg(char *blz,char *kto,RETVAL *retvals)
|
|
20742
20645
|
* # Copyright (C) 2007 Michael Plugge <m.plugge@hs-mannheim.de> #
|
20743
20646
|
* ###########################################################################
|
20744
20647
|
*/
|
20648
|
+
#line 19347 "ruby/ext/konto_check_raw/konto_check.lxx"
|
20745
20649
|
DLL_EXPORT int kto_check_pz_dbg(char *pz,char *kto,char *blz,RETVAL *retvals)
|
20746
20650
|
{
|
20747
20651
|
int untermethode,pz_methode;
|
@@ -20977,6 +20881,7 @@ DLL_EXPORT int get_lut_info2_b(char *lutname,int *version,char **prolog_p,char *
|
|
20977
20881
|
}
|
20978
20882
|
else
|
20979
20883
|
**user_info_p=0;
|
20884
|
+
#line 19568 "ruby/ext/konto_check_raw/konto_check.lxx"
|
20980
20885
|
FREE(prolog);
|
20981
20886
|
return OK;
|
20982
20887
|
}
|
@@ -21111,20 +21016,20 @@ DLL_EXPORT const char *get_kto_check_version_x(int mode)
|
|
21111
21016
|
case 3:
|
21112
21017
|
return __DATE__ ", " __TIME__; /* Compilierdatum und -zeit */
|
21113
21018
|
case 4: /* Datum der Pr�fziffermethode */
|
21114
|
-
if(
|
21115
|
-
return "04.
|
21019
|
+
if(pz_aenderungen_aktivieren_2017_12)
|
21020
|
+
return "04.12.2017";
|
21116
21021
|
else
|
21117
|
-
return "
|
21022
|
+
return "04.09.2017 (Aenderungen vom 04.12.2017 enthalten aber noch nicht aktiviert)";
|
21118
21023
|
case 5:
|
21119
|
-
return "04.
|
21024
|
+
return "04.12.2017";
|
21120
21025
|
case 6:
|
21121
|
-
return "
|
21026
|
+
return "26. November 2017"; /* Klartext-Datum der Bibliotheksversion */
|
21122
21027
|
case 7:
|
21123
21028
|
return "final"; /* Versions-Typ der Bibliotheksversion (development, beta, final) */
|
21124
21029
|
case 8:
|
21125
21030
|
return "6"; /* Hauptversionszahl */
|
21126
21031
|
case 9:
|
21127
|
-
return "
|
21032
|
+
return "02"; /* Unterversionszahl */
|
21128
21033
|
}
|
21129
21034
|
}
|
21130
21035
|
|
@@ -21270,6 +21175,7 @@ DLL_EXPORT int dump_lutfile(char *outputname,UINT4 *required)
|
|
21270
21175
|
default:
|
21271
21176
|
break;
|
21272
21177
|
}
|
21178
|
+
#line 19801 "ruby/ext/konto_check_raw/konto_check.lxx"
|
21273
21179
|
fputc('\n',out);
|
21274
21180
|
while(--i)fputc('=',out);
|
21275
21181
|
fputc('\n',out);
|
@@ -21594,6 +21500,7 @@ DLL_EXPORT const char *iban2bic_id(char *iban,int *retval,int *blz,int *kto)
|
|
21594
21500
|
return iban2bic(iban,retval,b,k);
|
21595
21501
|
}
|
21596
21502
|
|
21503
|
+
#line 20126 "ruby/ext/konto_check_raw/konto_check.lxx"
|
21597
21504
|
/* Funktion iban_gen(), iban_bic_gen() und iban_bic_gen1 +���1 */
|
21598
21505
|
/* ###########################################################################
|
21599
21506
|
* # Die Funktion iban_gen generiert aus Bankleitzahl und Kontonummer eine #
|
@@ -22426,6 +22333,7 @@ DLL_EXPORT int ipi_check(char *zweck)
|
|
22426
22333
|
* # Copyright (C) 2009,2011 Michael Plugge <m.plugge@hs-mannheim.de> #
|
22427
22334
|
* ###########################################################################
|
22428
22335
|
*/
|
22336
|
+
#line 20959 "ruby/ext/konto_check_raw/konto_check.lxx"
|
22429
22337
|
|
22430
22338
|
/* Funktion volltext_zeichen() +���2 */
|
22431
22339
|
/* Diese Funktion gibt f�r Zeichen die bei der Volltextsuche g�ltig sind
|
@@ -23272,6 +23180,7 @@ static int qcmp_bic_h(const void *ap,const void *bp)
|
|
23272
23180
|
return a-b;
|
23273
23181
|
}
|
23274
23182
|
|
23183
|
+
#line 21806 "ruby/ext/konto_check_raw/konto_check.lxx"
|
23275
23184
|
|
23276
23185
|
/* Funktion qcmp_bic() +���3 */
|
23277
23186
|
static int qcmp_bic(const void *ap,const void *bp)
|
@@ -23376,6 +23285,7 @@ static int qcmp_iban_regel(const void *ap,const void *bp)
|
|
23376
23285
|
else
|
23377
23286
|
return a-b;
|
23378
23287
|
}
|
23288
|
+
#line 21821 "ruby/ext/konto_check_raw/konto_check.lxx"
|
23379
23289
|
|
23380
23290
|
/* Funktion init_blzf() +���2
|
23381
23291
|
* Diese Funktion initialisiert das Array mit den Bankleitzahlen f�r alle
|
@@ -23443,6 +23353,7 @@ DLL_EXPORT int konto_check_idx2blz(int idx,int *zweigstelle,int *retval)
|
|
23443
23353
|
}
|
23444
23354
|
|
23445
23355
|
/* Funktion suche_int1() +���2 */
|
23356
|
+
#line 21889 "ruby/ext/konto_check_raw/konto_check.lxx"
|
23446
23357
|
static int suche_int1(int a1,int a2,int *anzahl,int **start_idx,int **zweigstellen_base,int **blz_base,
|
23447
23358
|
int **base_name,int **base_sort,int(*cmp)(const void *, const void *),int cnt,int such_idx)
|
23448
23359
|
{
|
@@ -23493,6 +23404,7 @@ static int suche_int1(int a1,int a2,int *anzahl,int **start_idx,int **zweigstell
|
|
23493
23404
|
}
|
23494
23405
|
|
23495
23406
|
/* Funktion suche_int2() +���2 */
|
23407
|
+
#line 21940 "ruby/ext/konto_check_raw/konto_check.lxx"
|
23496
23408
|
static int suche_int2(int a1,int a2,int *anzahl,int **start_idx,int **zweigstellen_base,int **blz_base,
|
23497
23409
|
int **base_name,int **base_sort,int(*cmp)(const void *, const void *),int such_idx,int pz_suche)
|
23498
23410
|
{
|
@@ -24107,6 +24019,7 @@ static int cmp_suche_sort(const void *ap,const void *bp)
|
|
24107
24019
|
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)
|
24108
24020
|
{
|
24109
24021
|
int i,j,last_idx,*idx_a,*cnt_o;
|
24022
|
+
#line 22556 "ruby/ext/konto_check_raw/konto_check.lxx"
|
24110
24023
|
|
24111
24024
|
if(idx_op)*idx_op=NULL;
|
24112
24025
|
if(cnt_op)*cnt_op=NULL;
|
@@ -24188,6 +24101,7 @@ DLL_EXPORT int lut_suche_sort2(int anzahl,int *blz,int *zweigstellen,int *anzahl
|
|
24188
24101
|
return OK;
|
24189
24102
|
}
|
24190
24103
|
|
24104
|
+
#line 22639 "ruby/ext/konto_check_raw/konto_check.lxx"
|
24191
24105
|
/* Funktion lut_suche_volltext() +���2 */
|
24192
24106
|
DLL_EXPORT int lut_suche_volltext(char *such_wort,int *anzahl,int *base_name_idx,char ***base_name,
|
24193
24107
|
int *zweigstellen_anzahl,int **start_idx,int **zweigstellen_base,int **blz_base)
|
@@ -24317,7 +24231,7 @@ DLL_EXPORT int lut_suche_blz(int such1,int such2,int *anzahl,int **start_idx,int
|
|
24317
24231
|
return suche_int1(such1,such2,anzahl,start_idx,zweigstellen_base,blz_base,&blz_f,&sort_blz,qcmp_blz,cnt,0);
|
24318
24232
|
}
|
24319
24233
|
|
24320
|
-
#line
|
24234
|
+
#line 22789 "ruby/ext/konto_check_raw/konto_check.lxx"
|
24321
24235
|
/* Funktion lut_suche_bic() +���2 */
|
24322
24236
|
DLL_EXPORT int lut_suche_bic(char *such_name,int *anzahl,int **start_idx,int **zweigstellen_base,
|
24323
24237
|
char ***base_name,int **blz_base)
|
@@ -24371,6 +24285,7 @@ DLL_EXPORT int lut_suche_pz(int such1,int such2,int *anzahl,int **start_idx,int
|
|
24371
24285
|
{
|
24372
24286
|
int retval;
|
24373
24287
|
|
24288
|
+
|
24374
24289
|
if(anzahl)*anzahl=0;
|
24375
24290
|
if(such2 && such1>such2)return INVALID_SEARCH_RANGE;
|
24376
24291
|
if((init_status&7)<7)return LUT2_NOT_INITIALIZED;
|
@@ -24384,6 +24299,7 @@ DLL_EXPORT int lut_suche_pz(int such1,int such2,int *anzahl,int **start_idx,int
|
|
24384
24299
|
/* Funktion lut_suche_plz() +���2 */
|
24385
24300
|
DLL_EXPORT int lut_suche_plz(int such1,int such2,int *anzahl,int **start_idx,int **zweigstellen_base,int **base_name,int **blz_base)
|
24386
24301
|
{
|
24302
|
+
|
24387
24303
|
if(anzahl)*anzahl=0;
|
24388
24304
|
if(such2 && such1>such2)return INVALID_SEARCH_RANGE;
|
24389
24305
|
if((init_status&7)<7)return LUT2_NOT_INITIALIZED;
|
@@ -24396,6 +24312,7 @@ DLL_EXPORT int lut_suche_plz(int such1,int such2,int *anzahl,int **start_idx,int
|
|
24396
24312
|
/* Funktion lut_suche_regel() +���2 */
|
24397
24313
|
DLL_EXPORT int lut_suche_regel(int such1,int such2,int *anzahl,int **start_idx,int **zweigstellen_base,int **base_name,int **blz_base)
|
24398
24314
|
{
|
24315
|
+
|
24399
24316
|
if(anzahl)*anzahl=0;
|
24400
24317
|
if(such2 && such1>such2)return INVALID_SEARCH_RANGE;
|
24401
24318
|
if((init_status&7)<7)return LUT2_NOT_INITIALIZED;
|
@@ -24405,6 +24322,7 @@ DLL_EXPORT int lut_suche_regel(int such1,int such2,int *anzahl,int **start_idx,i
|
|
24405
24322
|
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);
|
24406
24323
|
}
|
24407
24324
|
|
24325
|
+
#line 22822 "ruby/ext/konto_check_raw/konto_check.lxx"
|
24408
24326
|
|
24409
24327
|
/* Funktion lut_suche_bic_h() +���2 */
|
24410
24328
|
DLL_EXPORT int lut_suche_bic_h(char *such_name,int *anzahl,int **start_idx,int **zweigstellen_base,
|
@@ -24790,6 +24708,7 @@ DLL_EXPORT const char *iban_ort(char *iban,int filiale,int*retval)
|
|
24790
24708
|
{
|
24791
24709
|
return iban_fkt_s(iban,filiale,retval,lut_ort);
|
24792
24710
|
}
|
24711
|
+
#line 22911 "ruby/ext/konto_check_raw/konto_check.lxx"
|
24793
24712
|
|
24794
24713
|
static int bic_fkt_c(char *bic1,int mode,int filiale,int *retval,char *base,int error)
|
24795
24714
|
{
|
@@ -25734,7 +25653,7 @@ static int convert_encoding(char **data,UINT4 *len)
|
|
25734
25653
|
DLL_EXPORT const char *pz2str(int pz,int *ret)
|
25735
25654
|
{
|
25736
25655
|
if(ret){
|
25737
|
-
if(pz%1000>=
|
25656
|
+
if(pz%1000>=145)
|
25738
25657
|
*ret=NOT_DEFINED;
|
25739
25658
|
else
|
25740
25659
|
*ret=OK;
|
@@ -26078,6 +25997,7 @@ DLL_EXPORT const char *pz2str(int pz,int *ret)
|
|
26078
25997
|
default: return "???";
|
26079
25998
|
}
|
26080
25999
|
}
|
26000
|
+
#line 23866 "ruby/ext/konto_check_raw/konto_check.lxx"
|
26081
26001
|
|
26082
26002
|
/* Funktion lut_keine_iban_berechnung() +���1 */
|
26083
26003
|
/*
|
@@ -26192,7 +26112,7 @@ DLL_EXPORT int lut_keine_iban_berechnung(char *iban_blacklist,char *lutfile,int
|
|
26192
26112
|
/* Funktion pz_aenderungen_enable() +���1 */
|
26193
26113
|
/* ###########################################################################
|
26194
26114
|
* # Die Funktion pz_aenderungen_enable() dient dazu, den Status des Flags #
|
26195
|
-
* #
|
26115
|
+
* # pz_aenderungen_aktivieren_2017_12 abzufragen bzw. zu setzen. Falls die Variable #
|
26196
26116
|
* # set 1 ist, werden die �nderungen aktiviert, falls sie 0 ist, werden #
|
26197
26117
|
* # die �nderungen deaktiviert. Bei allen anderen Werten wird das aktuelle #
|
26198
26118
|
* # Flag nicht ver�ndert, sondern nur der Status zur�ckgegeben. #
|
@@ -26208,8 +26128,8 @@ DLL_EXPORT int lut_keine_iban_berechnung(char *iban_blacklist,char *lutfile,int
|
|
26208
26128
|
|
26209
26129
|
DLL_EXPORT int pz_aenderungen_enable(int set)
|
26210
26130
|
{
|
26211
|
-
if(set==0 || set==1)
|
26212
|
-
return
|
26131
|
+
if(set==0 || set==1)pz_aenderungen_aktivieren_2017_12=set;
|
26132
|
+
return pz_aenderungen_aktivieren_2017_12;
|
26213
26133
|
}
|
26214
26134
|
|
26215
26135
|
#if DEBUG>0
|
@@ -26241,6 +26161,7 @@ DLL_EXPORT char *kto_check_test_vars(char *txt,UINT4 i)
|
|
26241
26161
|
#endif
|
26242
26162
|
|
26243
26163
|
|
26164
|
+
#line 24030 "ruby/ext/konto_check_raw/konto_check.lxx"
|
26244
26165
|
/* Funktionen *_id() +���1 */
|
26245
26166
|
/* ###########################################################################
|
26246
26167
|
* # Die folgenden Funktionen sind die id-Varianten von Funktionen, die #
|
@@ -4358,7 +4358,7 @@ void Init_konto_check_raw()
|
|
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. 6.
|
4361
|
+
* and this version (V. 6.02 from 2017-11-26):
|
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().
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konto_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.02.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Provideal Systems GmbH
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thoughtbot-shoulda
|