aboutsummaryrefslogtreecommitdiffstats
path: root/libcontacts_same_number.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-13 17:29:14 +0200
committerMattias Andrée <maandree@kth.se>2021-04-13 17:29:14 +0200
commit6546989d280d8fc1e8e2bc152f08d9b04090d4b8 (patch)
treed201c83a72d9ef296773794d0cfce6dd7ecab7e0 /libcontacts_same_number.3
parentUpdate todo: do not support multiple calendars, all birthdays shall be stored in gregorian, and other software shall convert (diff)
downloadlibcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.gz
libcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.bz2
libcontacts-6546989d280d8fc1e8e2bc152f08d9b04090d4b8.tar.xz
m + add section 3 man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcontacts_same_number.3')
-rw-r--r--libcontacts_same_number.374
1 files changed, 74 insertions, 0 deletions
diff --git a/libcontacts_same_number.3 b/libcontacts_same_number.3
new file mode 100644
index 0000000..3b30a89
--- /dev/null
+++ b/libcontacts_same_number.3
@@ -0,0 +1,74 @@
+.TH LIBCONTACTS_SAME_NUMBER 3 LIBCONTACTS
+.SH NAME
+libcontacts_same_number \- Save a contact
+.SH SYNOPSIS
+.nf
+#include <libcontacts.h>
+
+int libcontacts_same_number(const char *\fIa\fP, const char *\fIa_country\fP, const char *\fIb\fP, const char *\fIb_country\fP);
+.fi
+.PP
+Link with
+.IR -lcontacts .
+
+.SH DESCRIPTION
+The
+.BR libcontacts_same_number ()
+function checks whether the telephone numbers specified
+in the
+.I a
+and
+.I b
+parameters are the same number.
+.PP
+The country calling code for
+.I a
+and
+.I b
+may be specified in the
+.I a_country
+and
+.I b_country
+parameters respectively. If the empty string is specified
+as a country calling code, it is treated as unspecified.
+.B \(dq00\(dq
+will be added automatically if it, or its alternative
+.B \(dq+\(dq
+is missing.
+
+.SH RETURN VALUE
+The
+.BR libcontacts_same_number ()
+function returns 1 or 0 upon successful completion;
+otherwise -1 is returned and
+.I errno
+is set appropriately to indicate the error.
+If the returned value is 1, the numbers match,
+if the returned value is 0, the numbers do not match.
+
+.SH ERRORS
+The
+.BR libcontacts_same_number ()
+function will fail if:
+.TP
+.B EINVAL
+The
+.I a
+or
+.I b
+is
+.I NULL
+or the empty string.
+.PP
+The
+.BR libcontacts_same_number ()
+function may fail for any reason specified for the
+.BR malloc (3)
+function.
+
+.SH FUTURE DIRECTIONS
+This function may be removed in the future.
+
+.SH SEE ALSO
+.BR libcontacts.h (0),
+.BR libcontacts (7)