Update of /cvsroot/refdb/refdb/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20208/src
Modified Files:
Tag: Release_0_9_5_stable
backend.h backend.c
Log Message:
new function get_refdb_note_share()
Index: backend.h
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend.h,v
retrieving revision 1.23.2.4
retrieving revision 1.23.2.5
diff -u -U2 -r1.23.2.4 -r1.23.2.5
--- backend.h 11 Sep 2005 19:55:12 -0000 1.23.2.4
+++ backend.h 21 Sep 2005 23:27:36 -0000 1.23.2.5
@@ -95,4 +95,5 @@
const char* get_refdb_note_key(dbi_result dbires);
char* get_refdb_note_date(dbi_result dbires, char* date, int mode);
+short int get_refdb_note_share(dbi_result dbires);
const char* get_refdb_note_user_name(dbi_result dbires);
char* get_refdb_note_title_copy(dbi_result dbires);
Index: backend.c
===================================================================
RCS file: /cvsroot/refdb/refdb/src/backend.c,v
retrieving revision 1.27.2.8
retrieving revision 1.27.2.9
diff -u -U2 -r1.27.2.8 -r1.27.2.9
--- backend.c 18 Sep 2005 22:51:25 -0000 1.27.2.8
+++ backend.c 21 Sep 2005 23:27:36 -0000 1.27.2.9
@@ -306,4 +306,27 @@
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ get_refdb_note_share(): retrieves the share attribute
+ from a note query
+
+ char* get_refdb_note_share returns 1 if public, 0 if private, -1
+ if not set by user
+
+ dbi_result dbires database query result, pointing to the current
+ dataset
+
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+short int get_refdb_note_share(dbi_result dbires) {
+ short int result;
+
+ result = dbi_result_get_short(dbires, "note_share");
+ if (dbi_conn_error_flag(dbi_result_get_conn(dbires))) {
+ return NULL;
+ }
+ else {
+ return result;
+ }
+}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
request_notes_by_ref(): requests all notes that are associated to
a given reference
|