[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog gpg.c gpg.h log.c rcs.c
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog gpg.c gpg.h log.c rcs.c |
Date: |
Wed, 24 May 2006 16:38:51 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/05/24 16:38:51
Modified files:
src : ChangeLog gpg.c gpg.h log.c rcs.c
Log message:
* gpg.c (gpg_keyid2longstring): New function.
* gpg.h (gpg_keyid2string): New macro.
(gpg_keyid2longstring): New macro/function.
* log.c (log_version): Avoid long long, using new macros/functions.
* rcs.c (RCS_delete_openpgp_signatures): Likewise.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?tr1=1.3427&tr2=1.3428&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/gpg.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/gpg.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/log.c.diff?tr1=1.108&tr2=1.109&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcs.c.diff?tr1=1.368&tr2=1.369&r1=text&r2=text
Patches:
Index: ccvs/src/ChangeLog
diff -u ccvs/src/ChangeLog:1.3427 ccvs/src/ChangeLog:1.3428
--- ccvs/src/ChangeLog:1.3427 Wed May 24 16:22:06 2006
+++ ccvs/src/ChangeLog Wed May 24 16:38:50 2006
@@ -1,8 +1,9 @@
2006-05-24 Derek Price <address@hidden>
- * gpg.c (gpg_keyid2string): New function.
- * gpg.h (gpg_keyid2string): New macro/function.
- * log.c (log_version): Avoid long long.
+ * gpg.c (gpg_keyid2longstring): New function.
+ * gpg.h (gpg_keyid2string): New macro.
+ (gpg_keyid2longstring): New macro/function.
+ * log.c (log_version): Avoid long long, using new macros/functions.
* rcs.c (RCS_delete_openpgp_signatures): Likewise.
2006-05-23 Mark D. Baushke <address@hidden>
Index: ccvs/src/gpg.c
diff -u ccvs/src/gpg.c:1.3 ccvs/src/gpg.c:1.4
--- ccvs/src/gpg.c:1.3 Wed May 24 16:22:06 2006
+++ ccvs/src/gpg.c Wed May 24 16:38:50 2006
@@ -805,7 +805,7 @@
#ifndef HAVE_LONG_LONG
char *
-gpg_keyid2string (uint64_t keyid)
+gpg_keyid2longstring (uint64_t keyid)
{
if (!(keyid >> 32))
return Xasprintf ("0x%lx", (unsigned long)keyid);
Index: ccvs/src/gpg.h
diff -u ccvs/src/gpg.h:1.3 ccvs/src/gpg.h:1.4
--- ccvs/src/gpg.h:1.3 Wed May 24 16:22:06 2006
+++ ccvs/src/gpg.h Wed May 24 16:38:51 2006
@@ -46,9 +46,13 @@
void set_openpgp_textmode (const char *textmode);
const char *get_openpgp_textmode (void);
+# define gpg_keyid2string(k) \
+ Xasprintf ("0x%lx", (unsigned long)((k) & 0xFFFFFFFF))
+
# ifdef HAVE_LONG_LONG
-# define gpg_keyid2string(k) Xasprintf ("0x%llx", (unsigned long long)(k))
+# define gpg_keyid2longstring(k) \
+ Xasprintf ("0x%llx", (unsigned long long)(k))
# else
-char *gpg_keyid2string (uint64_t keyid);
+char *gpg_keyid2longstring (uint64_t keyid);
# endif
#endif /* GPG_H */
Index: ccvs/src/log.c
diff -u ccvs/src/log.c:1.108 ccvs/src/log.c:1.109
--- ccvs/src/log.c:1.108 Wed May 24 16:22:06 2006
+++ ccvs/src/log.c Wed May 24 16:38:51 2006
@@ -1708,9 +1708,9 @@
{
char *hexsig;
cvs_output_tagged ("openpgp-keyid-header",
- "OpenPGP signature using key ID 0x");
+ "OpenPGP signature using key ID ");
/* GnuPG truncates this too. */
- hexsig = Xasprintf ("%lx", (unsigned long)(sig.keyid & 0xFFFFFFFF));
+ hexsig = gpg_keyid2string (sig.keyid);
cvs_output_tagged ("openpgp-keyid", hexsig);
free (hexsig);
cvs_output_tagged ("openpgp-keyid-footer", ";");
Index: ccvs/src/rcs.c
diff -u ccvs/src/rcs.c:1.368 ccvs/src/rcs.c:1.369
--- ccvs/src/rcs.c:1.368 Wed May 24 16:22:06 2006
+++ ccvs/src/rcs.c Wed May 24 16:38:51 2006
@@ -4936,8 +4936,8 @@
bool found = false;
int rc;
- TRACE (TRACE_FUNCTION, "RCS_delete_openpgp_signatures (%s, %s, 0x%lx)",
- finfo->fullname, rev, (unsigned long) keyid);
+ TRACE (TRACE_FUNCTION, "RCS_delete_openpgp_signatures (%s, %s, %s)",
+ finfo->fullname, rev, gpg_keyid2string (keyid));
if (finfo->rcs->flags & PARTIAL)
RCS_reparsercsfile (finfo->rcs, NULL, NULL);
@@ -4977,12 +4977,12 @@
*/
while (!(rc = parse_signature (membuf, &sig)))
{
- char *hexid1;
- char *hexid2;
+ char *hexid1 = NULL;
+ char *hexid2 = NULL;
if (trace >= TRACE_DATA)
{
- hexid1 = Xasprintf ("0x%lx", (unsigned long) keyid);
- hexid2 = gpg_keyid2string (sig.keyid);
+ hexid1 = gpg_keyid2string (keyid);
+ hexid2 = gpg_keyid2longstring (sig.keyid);
}
if ((sig.keyid & 0xFFFFFFFF) == keyid)
{
@@ -5006,9 +5006,7 @@
if (!found)
{
- char *hexid = Xasprintf ("0x%lx%lx",
- (unsigned long)(keyid >> 32),
- (unsigned long)(keyid & 0xFFFFFFFF));
+ char *hexid = gpg_keyid2string (keyid);
error (0, 0,
"No signatures with key ID %s found in revision %s of `%s'",
hexid, rev, finfo->fullname);