[Tcladdressbook-commits] Source TclAddressBook.c,1.36,1.37
Status: Alpha
Brought to you by:
bdesgraupes
|
From: Bernard D. <bde...@us...> - 2004-08-03 17:17:24
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31110/Source Modified Files: TclAddressBook.c Log Message: Fixed confusion with boolean in [set] command Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- TclAddressBook.c 3 Aug 2004 09:53:38 -0000 1.36 +++ TclAddressBook.c 3 Aug 2004 17:17:14 -0000 1.37 @@ -601,7 +601,7 @@ ABRecordRef theRecord; CONST84 char * theUID; CFStringRef strRef; - int length, result = TCL_OK; + int length, result = TCL_OK, success; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "recordID"); @@ -615,9 +615,9 @@ ab = ABGetSharedAddressBook(); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, strRef, resultPtr, &theRecord); + success = TclAB_RecordFromUID(ab, strRef, resultPtr, &theRecord); CFRelease(strRef); - if (!result) {return TCL_ERROR;} + if (!success) {return TCL_ERROR;} if (!ABRemoveRecord(ab, theRecord)) { Tcl_AppendStringsToObj(resultPtr, "Couldn't remove record from database", (char *) NULL); @@ -661,7 +661,7 @@ ABRecordRef theRecord; CFStringRef uidRef; CFDataRef vCard; - int kind, length, result; + int kind, length, result, success; Tcl_Obj * objPtr; if (objc != 3) { @@ -673,9 +673,9 @@ // Get the address book ab = ABGetSharedAddressBook(); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); + success = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); CFRelease(uidRef); - if (!result) {return TCL_ERROR;} + if (!success) {return TCL_ERROR;} // Is it a person or a group? kind = TclAB_TypeFromRecord(ab, theRecord); @@ -1253,7 +1253,7 @@ ABRecordRef theRecord; CONST84 char * theUID; CFStringRef uidRef; - int index, kind, length, result; + int index, kind, length, result, success; ABAddressBookRef ab; Boolean onlyID = false; @@ -1281,9 +1281,9 @@ uidRef = CFStringCreateWithCString(NULL, theUID, NULL); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); + success = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); CFRelease(uidRef); - if (!result) {return TCL_ERROR;} + if (!success) {return TCL_ERROR;} // Is it a person or a group? kind = TclAB_TypeFromRecord(ab, theRecord); @@ -1467,7 +1467,7 @@ ABRecordRef theRecord; CONST84 char * theUID; CFStringRef uidRef; - int kind, length, result; + int kind, length, success; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "recordID"); @@ -1482,9 +1482,9 @@ ab = ABGetSharedAddressBook(); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); + success = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); CFRelease(uidRef); - if (!result) {return TCL_ERROR;} + if (!success) {return TCL_ERROR;} // Is it a person or a group? kind = TclAB_TypeFromRecord(ab, theRecord); @@ -1880,7 +1880,7 @@ CFTypeRef valueRef; ABRecordRef theRecord; ABPropertyType thePropType; - int kind, length, result = TCL_OK; + int kind, length, result = TCL_OK, success; Boolean setIt = false; if (objc != 4 && objc != 5) { @@ -1905,9 +1905,9 @@ ab = ABGetSharedAddressBook(); // Find the record corresponding to the UID - result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); + success = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord); CFRelease(uidRef); - if (!result) {return TCL_ERROR;} + if (!success) {return TCL_ERROR;} // Is recordID a person or a group? kind = TclAB_TypeFromRecord(ab, theRecord); |