[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101752: src/gnutls.c: Doc fixes. Mak
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101752: src/gnutls.c: Doc fixes. Make some functions static. |
Date: |
Sun, 03 Oct 2010 06:12:15 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101752
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-03 06:12:15 +0200
message:
src/gnutls.c: Doc fixes. Make some functions static.
(emacs_gnutls_handshake, gnutls_make_error, gnutls_emacs_global_init)
(gnutls_emacs_global_deinit): Make static.
(Fgnutls_get_initstage, Fgnutls_deinit, Fgnutls_boot, Fgnutls_bye):
Fix typos in docstrings.
(Fgnutls_error_fatalp, Fgnutls_error_string): Doc fixes.
(Fgnutls_errorp): Doc fix; use ERR for the argument name.
modified:
src/ChangeLog
src/gnutls.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-10-03 00:59:02 +0000
+++ b/src/ChangeLog 2010-10-03 04:12:15 +0000
@@ -1,3 +1,12 @@
+2010-10-03 Juanma Barranquero <address@hidden>
+
+ * gnutls.c (emacs_gnutls_handshake, gnutls_make_error)
+ (gnutls_emacs_global_init, gnutls_emacs_global_deinit): Make static.
+ (Fgnutls_get_initstage, Fgnutls_deinit, Fgnutls_boot, Fgnutls_bye):
+ Fix typos in docstrings.
+ (Fgnutls_error_fatalp, Fgnutls_error_string): Doc fixes.
+ (Fgnutls_errorp): Doc fix; use ERR for the argument name.
+
2010-10-03 Chong Yidong <address@hidden>
* keyboard.c (command_loop_1): Make sure the mark is really alive
=== modified file 'src/gnutls.c'
--- a/src/gnutls.c 2010-09-29 14:30:45 +0000
+++ b/src/gnutls.c 2010-10-03 04:12:15 +0000
@@ -32,7 +32,7 @@
Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake;
int global_initialized;
-void
+static void
emacs_gnutls_handshake (struct Lisp_Process *proc)
{
gnutls_session_t state = proc->gnutls_state;
@@ -117,7 +117,8 @@
known symbol like `gnutls_e_interrupted' and `gnutls_e_again' or
simply the integer value of the error. GNUTLS_E_SUCCESS is mapped
to Qt. */
-Lisp_Object gnutls_make_error (int error)
+static Lisp_Object
+gnutls_make_error (int error)
{
switch (error)
{
@@ -135,9 +136,9 @@
}
DEFUN ("gnutls-get-initstage", Fgnutls_get_initstage, Sgnutls_get_initstage,
1, 1, 0,
- doc: /* Return the GnuTLS init stage of PROCESS.
+ doc: /* Return the GnuTLS init stage of process PROC.
See also `gnutls-boot'. */)
- (Lisp_Object proc)
+ (Lisp_Object proc)
{
CHECK_PROCESS (proc);
@@ -145,19 +146,21 @@
}
DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0,
- doc: /* Returns t if ERROR (as generated by gnutls_make_error)
-indicates a GnuTLS problem. */)
- (Lisp_Object error)
+ doc: /* Return t if ERROR indicates a GnuTLS problem.
+ERROR is an integer or a symbol with an integer `gnutls-code' property.
+usage: (gnutls-errorp ERROR) */)
+ (Lisp_Object err)
{
- if (EQ (error, Qt)) return Qnil;
+ if (EQ (err, Qt)) return Qnil;
return Qt;
}
DEFUN ("gnutls-error-fatalp", Fgnutls_error_fatalp, Sgnutls_error_fatalp, 1,
1, 0,
- doc: /* Checks if ERROR is fatal.
-ERROR is an integer or a symbol with an integer `gnutls-code' property. */)
- (Lisp_Object err)
+ doc: /* Check if ERROR is fatal.
+ERROR is an integer or a symbol with an integer `gnutls-code' property.
+usage: (gnutls-error-fatalp ERROR) */)
+ (Lisp_Object err)
{
Lisp_Object code;
@@ -186,9 +189,10 @@
}
DEFUN ("gnutls-error-string", Fgnutls_error_string, Sgnutls_error_string, 1,
1, 0,
- doc: /* Returns a description of ERROR.
-ERROR is an integer or a symbol with an integer `gnutls-code' property. */)
- (Lisp_Object err)
+ doc: /* Return a description of ERROR.
+ERROR is an integer or a symbol with an integer `gnutls-code' property.
+usage: (gnutls-error-string ERROR) */)
+ (Lisp_Object err)
{
Lisp_Object code;
@@ -214,9 +218,9 @@
}
DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
- doc: /* Deallocate GNU TLS resources associated with PROCESS.
+ doc: /* Deallocate GNU TLS resources associated with process PROC.
See also `gnutls-init'. */)
- (Lisp_Object proc)
+ (Lisp_Object proc)
{
gnutls_session_t state;
@@ -235,7 +239,8 @@
/* Initializes global GNU TLS state to defaults.
Call `gnutls-global-deinit' when GNU TLS usage is no longer needed.
Returns zero on success. */
-Lisp_Object gnutls_emacs_global_init (void)
+static Lisp_Object
+gnutls_emacs_global_init (void)
{
int ret = GNUTLS_E_SUCCESS;
@@ -249,7 +254,8 @@
/* Deinitializes global GNU TLS state.
See also `gnutls-global-init'. */
-Lisp_Object gnutls_emacs_global_deinit (void)
+static Lisp_Object
+gnutls_emacs_global_deinit (void)
{
if (global_initialized)
gnutls_global_deinit ();
@@ -259,17 +265,18 @@
return gnutls_make_error (GNUTLS_E_SUCCESS);
}
-static void gnutls_log_function (int level, const char* string)
+static void
+gnutls_log_function (int level, const char* string)
{
- message("gnutls.c: [%d] %s", level, string);
+ message ("gnutls.c: [%d] %s", level, string);
}
DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 7, 0,
- doc: /* Initializes client-mode GnuTLS for process PROC.
+ doc: /* Initialize client-mode GnuTLS for process PROC.
Currently only client mode is supported. Returns a success/failure
value you can check with `gnutls-errorp'.
-PRIORITY_STRING is a string describing the priority.
+PRIORITY-STRING is a string describing the priority.
TYPE is either `gnutls-anon' or `gnutls-x509pki'.
TRUSTFILE is a PEM encoded trust file for `gnutls-x509pki'.
KEYFILE is ... for `gnutls-x509pki' (TODO).
@@ -283,16 +290,16 @@
the protocols's priority except for disabling protocols that were not
specified.
-Processes must be initialized with this function before other GNU TLS
+Processes must be initialized with this function before other GnuTLS
functions are used. This function allocates resources which can only
be deallocated by calling `gnutls-deinit' or by calling it again.
Each authentication type may need additional information in order to
work. For X.509 PKI (`gnutls-x509pki'), you need TRUSTFILE and
KEYFILE and optionally CALLBACK. */)
- (Lisp_Object proc, Lisp_Object priority_string, Lisp_Object type,
- Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback,
- Lisp_Object loglevel)
+ (Lisp_Object proc, Lisp_Object priority_string, Lisp_Object type,
+ Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback,
+ Lisp_Object loglevel)
{
int ret = GNUTLS_E_SUCCESS;
@@ -427,9 +434,9 @@
GNUTLS_LOG (1, max_log_level, "setting the priority string");
- ret = gnutls_priority_set_direct(state,
- (char*) SDATA (priority_string),
- NULL);
+ ret = gnutls_priority_set_direct (state,
+ (char*) SDATA (priority_string),
+ NULL);
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
@@ -466,11 +473,11 @@
DEFUN ("gnutls-bye", Fgnutls_bye,
Sgnutls_bye, 2, 2, 0,
- doc: /* Terminate current GNU TLS connection for PROCESS.
+ doc: /* Terminate current GnuTLS connection for process PROC.
The connection should have been initiated using `gnutls-handshake'.
If CONT is not nil the TLS connection gets terminated and further
-receives and sends will be disallowed. If the return value is zero you
+receives and sends will be disallowed. If the return value is zero you
may continue using the connection. If CONT is nil, GnuTLS actually
sends an alert containing a close request and waits for the peer to
reply with the same message. In order to reuse the connection you
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101752: src/gnutls.c: Doc fixes. Make some functions static.,
Juanma Barranquero <=