Project

Profile

Help

Revision 6304fb8b

Added by O'Neil Delpratt 5 months ago

Saxon/C bug fixes and development work

View differences:

latest10/hec/Saxon.C.API/SaxonCXPath.c
10 10
jobject booleanValue(sxnc_environment *environi, bool b){ 
11 11
	
12 12
	 if(environi->env == NULL) {
13
		printf("Error: Saxon-C env variable is null\n");
13
		printf("Error: Saxon-C env variable is NULL\n");
14 14
		fflush (stdout);
15 15
           	return NULL;
16 16
	 }
......
35 35
jobject integerValue(sxnc_environment *environi, int i){ 
36 36
	
37 37
	 if(environi->env == NULL) {
38
		printf("Error: Saxon-C env variable is null\n");
38
		printf("Error: Saxon-C env variable is NULL\n");
39 39
		fflush (stdout);
40 40
           	return NULL;
41 41
	 }
......
67 67
jobject doubleValue(sxnc_environment *environi, double d){ 
68 68
	
69 69
	 if(environi->env == NULL) {
70
		printf("Error: Saxon-C env variable is null\n");
70
		printf("Error: Saxon-C env variable is NULL\n");
71 71
		fflush (stdout);
72 72
           	return NULL;
73 73
	 }
......
92 92
jobject floatValue(sxnc_environment *environi, float f){ 
93 93
	
94 94
	 if(environi->env == NULL) {
95
		printf("Error: Saxon-C env variable is null\n");
95
		printf("Error: Saxon-C env variable is NULL\n");
96 96
		fflush (stdout);
97 97
           	return NULL;
98 98
	 }
......
118 118
jobject longValue(sxnc_environment *environi, long l){ 
119 119
	
120 120
	 if(environi->env == NULL) {
121
		printf("Error: Saxon-C env variable is null\n");
121
		printf("Error: Saxon-C env variable is NULL\n");
122 122
		fflush (stdout);
123 123
           	return NULL;
124 124
	 }
......
143 143
jobject getJavaStringValue(sxnc_environment *environi, const char *str){ 
144 144
	
145 145
	 if(environi->env == NULL) {
146
		printf("Error: Saxon-C env variable is null\n");
146
		printf("Error: Saxon-C env variable is NULL\n");
147 147
		fflush (stdout);
148 148
           	return NULL;
149 149
	 }
......
166 166
	
167 167
	jclass  saxoncClass = lookForClass(environi->env, "net/sf/saxon/option/cpp/SaxonCAPI");
168 168
	 if(environi->env == NULL) {
169
		printf("Error: Saxon-C env variable is null\n");
169
		printf("Error: Saxon-C env variable is NULL\n");
170 170
		fflush (stdout);
171 171
           	return NULL;
172 172
	 }
......
198 198
	
199 199
	jclass  saxoncClass = lookForClass(environi->env, "net/sf/saxon/option/cpp/SaxonCAPI");
200 200
	 if(environi->env == NULL) {
201
		printf("Error: Saxon-C env variable is null\n");
201
		printf("Error: Saxon-C env variable is NULL\n");
202 202
		fflush (stdout);
203 203
           	return NULL;
204 204
	 }
......
360 360
	
361 361
	jclass  xdmValueClass = lookForClass(environi->env, "net/sf/saxon/s9api/XdmValue");
362 362
	 if(environi->env == NULL) {
363
		printf("Error: Saxon-C env variable is null\n");
363
		printf("Error: Saxon-C env variable is NULL\n");
364 364
		fflush (stdout);
365 365
           	return 0;
366 366
	 }
......
386 386
	
387 387
	jclass  xdmValueClass = lookForClass(environi->env, "net/sf/saxon/s9api/XdmValue");
388 388
	 if(environi->env == NULL) {
389
		printf("Error: Saxon-C env variable is null\n");
389
		printf("Error: Saxon-C env variable is NULL\n");
390 390
		fflush (stdout);
391 391
           	return 0;
392 392
	 }
......
418 418
	
419 419
jclass  xdmItemClass = lookForClass(environi->env, "net/sf/saxon/s9api/XdmItem");
420 420
	 if(environi->env == NULL) {
421
		printf("Error: Saxon-C env variable is null\n");
421
		printf("Error: Saxon-C env variable is NULL\n");
422 422
		fflush (stdout);
423 423
           	return 0;
424 424
	 }
......
441 441
int getIntegerValue(sxnc_environment *environi, sxnc_value value,  int failureVal){
442 442
	
443 443
	const char * valueStr = getStringValue(environi, value);
444
	if(valueStr != NULL) {		
444
	if(valueStr != NULL) {
445 445
		int value = atoi(valueStr);
446 446
		if(value != 0) {
447 447
			return value;
......
473 473
long getLongValue(sxnc_environment *environi, sxnc_value value,  long failureVal){
474 474
	
475 475
	const char * valueStr = getStringValue(environi, value);
476
	if(valueStr != NULL) {		
476
	if(valueStr != NULL) {
477 477
		long value = atol(valueStr);
478 478
		if(value != 0) {
479 479
			return value;
......
511 511
double getDoubleValue(sxnc_environment *environi, sxnc_value value, double failureVal){
512 512
	
513 513
	const char * valueStr = getStringValue(environi, value);
514
	if(valueStr != NULL) {		
514
	if(valueStr != NULL) {
515 515
		double value = atof(valueStr);
516 516
		if(value != 0) {
517 517
			return value;

Also available in: Unified diff