Browse code

db doc updated

Jan Janak authored on 09/08/2002 13:24:58
Showing 2 changed files
... ...
@@ -13,25 +13,25 @@ int bind_dbmod(void)
13 13
 	dbf.use_table = (db_use_table_f)find_export("db_use_table", 2);
14 14
 
15 15
 	dbf.init = (db_init_f)find_export("db_init", 1);
16
-	if (!dbf.init) return 1;
16
+	if (!dbf.init) return -1;
17 17
 
18 18
 	dbf.close = (db_close_f)find_export("db_close", 2);
19
-	if (!dbf.close) return 1;
19
+	if (!dbf.close) return -1;
20 20
 
21 21
 	dbf.query = (db_query_f)find_export("db_query", 2);
22
-	if (!dbf.query) return 1;
22
+	if (!dbf.query) return -1;
23 23
 
24 24
 	dbf.free_query = (db_free_query_f)find_export("db_free_query", 2);
25
-	if (!dbf.free_query) return 1;
25
+	if (!dbf.free_query) return -1;
26 26
 
27 27
 	dbf.insert = (db_insert_f)find_export("db_insert", 2);
28
-	if (!dbf.insert) return 1;
28
+	if (!dbf.insert) return -1;
29 29
 
30 30
 	dbf.delete = (db_delete_f)find_export("db_delete", 2);
31
-	if (!dbf.delete) return 1;
31
+	if (!dbf.delete) return -1;
32 32
 
33 33
 	dbf.update = (db_update_f)find_export("db_update", 2);
34
-	if (!dbf.update) return 1;
34
+	if (!dbf.update) return -1;
35 35
 
36 36
 	return 0;
37 37
 }
... ...
@@ -38,7 +38,7 @@ of db_con_t type serves as a handle for a particular database connection.
38 38
         void* con;       /* Database connection */
39 39
         void* res;       /* Result of previous operation */
40 40
         void* row;       /* Internal, not for public use */
41
-        int connected;   /* TRUE if connection is established */
41
+        int connected;   /* 1 if connection is established */
42 42
    } db_con_t;
43 43
 
44 44
 1.1.3 Macros
... ...
@@ -314,8 +314,8 @@ The function takes no parameters.
314 314
 
315 315
 2.1.4 Return Value
316 316
 
317
-The function returns TRUE if it was able to find addresses of all other 
318
-functions, otherwise FALSE is returned.
317
+The function returns 0 if it was able to find addresses of all other 
318
+functions, otherwise value < 0 is returned.
319 319
 
320 320
 
321 321
 2.2 Function db_init
... ...
@@ -349,7 +349,7 @@ database: If the database server supports multiple databases, you must specify
349 349
 2.2.4 Return Value
350 350
 
351 351
 The function returns pointer to db_con_t* representing the connection if it was
352
-successful, otherwise NULL is returned.
352
+successful, otherwise 0 is returned.
353 353
 
354 354
 
355 355
 2.3 Function db_close
... ...
@@ -411,7 +411,7 @@ You must call db_free_query _BEFORE_ you can call db_query again !
411 411
 
412 412
 2.4.4 Return Value
413 413
 
414
-The function returns TRUE if everything is OK, otherwise FALSE is returned.
414
+The function returns 0 if everything is OK, otherwise value < 0 is returned.
415 415
 
416 416
 
417 417
 2.5 Function db_free_query
... ...
@@ -435,8 +435,8 @@ _r: Pointer to db_res_t structure to destroy
435 435
 
436 436
 2.5.4 Return Value
437 437
 
438
-The function returns TRUE if everything is OK, otherwise the function returns
439
-FALSE.
438
+The function returns 0 if everything is OK, otherwise the function returns
439
+value < 0.
440 440
 
441 441
 
442 442
 2.6 Function db_insert
... ...
@@ -460,8 +460,8 @@ _n: Number of keys-value pairs int _k and _v parameters
460 460
 
461 461
 2.6.4 Return Value
462 462
 
463
-The function returns TRUE if everything is OK, otherwise the function returns
464
-FALSE.
463
+The function returns 0 if everything is OK, otherwise the function returns
464
+value < 0.
465 465
 
466 466
 
467 467
 2.7 Function db_delete
... ...
@@ -488,8 +488,8 @@ be empty).
488 488
 
489 489
 2.7.4 Return Value
490 490
 
491
-The function returns TRUE fi everything is OK, otherwise the function returns
492
-FALSE.
491
+The function returns 0 if everything is OK, otherwise the function returns
492
+value < 0.
493 493
 
494 494
 
495 495
 2.8 Function db_update
... ...
@@ -517,8 +517,8 @@ _un: Number of key-value pairs in _uk and _uv parameters
517 517
 
518 518
 2.8.4 Return Value
519 519
 
520
-The function returns TRUE if everything is OK, otherwise the function returns
521
-FALSE.
520
+The function returns 0 if everything is OK, otherwise the function returns
521
+value < 0.
522 522
 
523 523
 
524 524
 2.9 Function db_use_table
... ...
@@ -541,6 +541,6 @@ _t: Table name
541 541
 
542 542
 2.9.4 Return Value
543 543
 
544
-The function returns TRUE if everything is OK, otherwise the function returns
545
-FALSE.
544
+The function returns 0 if everything is OK, otherwise the function returns
545
+value < 0.
546 546