summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2007-11-25 17:13:09 +0000
committerUlrich Müller <ulm@gentoo.org>2007-11-25 17:13:09 +0000
commit4d8556b5440b230c5f5179106a67f09383a02d51 (patch)
tree514b52518c619a6eb17d4bf23eba6d181be73972 /app-editors/emacs/files
parentAdd built_with_use check for avahi dbus support. (diff)
downloadgentoo-2-4d8556b5440b230c5f5179106a67f09383a02d51.tar.gz
gentoo-2-4d8556b5440b230c5f5179106a67f09383a02d51.tar.bz2
gentoo-2-4d8556b5440b230c5f5179106a67f09383a02d51.zip
Correctly format integer values, patch from upstream CVS.
(Portage version: 2.1.3.19)
Diffstat (limited to 'app-editors/emacs/files')
-rw-r--r--app-editors/emacs/files/digest-emacs-21.4-r149
-rw-r--r--app-editors/emacs/files/digest-emacs-22.1-r33
-rw-r--r--app-editors/emacs/files/emacs-22.1-format-int.patch79
3 files changed, 91 insertions, 0 deletions
diff --git a/app-editors/emacs/files/digest-emacs-21.4-r14 b/app-editors/emacs/files/digest-emacs-21.4-r14
new file mode 100644
index 000000000000..f6cb42383cb8
--- /dev/null
+++ b/app-editors/emacs/files/digest-emacs-21.4-r14
@@ -0,0 +1,9 @@
+MD5 59359e85b1b43f60a7c59cf01496dd2a emacs-21.4-patches-1.tar.bz2 9598
+RMD160 a838e9d49fbc23e2c7f000a96fca06f0e347ab47 emacs-21.4-patches-1.tar.bz2 9598
+SHA256 75c8a3d9f420e9ab3f426b39b0f73299a22d399415cbd4190dfda63b6e65f3a1 emacs-21.4-patches-1.tar.bz2 9598
+MD5 8f9d97cbd126121bd5d97e5e31168a87 emacs-21.4a.tar.gz 20403483
+RMD160 c312e739935b56d08783bbfe97992297a363cb8a emacs-21.4a.tar.gz 20403483
+SHA256 1d50ddae117c48d689a3d772e390569edccfdc22168be0112d2093bd2d7c3216 emacs-21.4a.tar.gz 20403483
+MD5 32938cb5a7505d995a1e835639d19707 leim-21.4.tar.gz 3291433
+RMD160 89e1108bfe06425a0d6b4d941f9c297551bafcca leim-21.4.tar.gz 3291433
+SHA256 db24946985dd644bfed18815d6e991dad27f8ab1fd5823dd6dc4eb8dcd04333b leim-21.4.tar.gz 3291433
diff --git a/app-editors/emacs/files/digest-emacs-22.1-r3 b/app-editors/emacs/files/digest-emacs-22.1-r3
new file mode 100644
index 000000000000..44943fdbcd94
--- /dev/null
+++ b/app-editors/emacs/files/digest-emacs-22.1-r3
@@ -0,0 +1,3 @@
+MD5 6949df37caec2d7a2e0eee3f1b422726 emacs-22.1.tar.gz 38172226
+RMD160 da5360871db8b1d473ff7f0b0937ee6c278c0b19 emacs-22.1.tar.gz 38172226
+SHA256 1ec43bef7127e572f92d7c3a846951cf8e263e27445c62c867035f94681c3ed0 emacs-22.1.tar.gz 38172226
diff --git a/app-editors/emacs/files/emacs-22.1-format-int.patch b/app-editors/emacs/files/emacs-22.1-format-int.patch
new file mode 100644
index 000000000000..851bcb91f4d9
--- /dev/null
+++ b/app-editors/emacs/files/emacs-22.1-format-int.patch
@@ -0,0 +1,79 @@
+2007-11-15 Andreas Schwab <schwab@suse.de>
+
+ * editfns.c (Fformat): Correctly format EMACS_INT values. Also
+ take precision into account when formatting an integer.
+
+--- src/editfns.c 8 Aug 2007 07:49:19 -0000 1.439.2.3
++++ src/editfns.c 16 Nov 2007 00:18:55 -0000 1.439.2.8
+@@ -3543,8 +3543,10 @@ usage: (format STRING &rest OBJECTS) */
+ precision[n+1] = 10 * precision[n+1] + *format - '0';
+ }
+
+- if (format - this_format_start + 1 > longest_format)
+- longest_format = format - this_format_start + 1;
++ /* Extra +1 for 'l' that we may need to insert into the
++ format. */
++ if (format - this_format_start + 2 > longest_format)
++ longest_format = format - this_format_start + 2;
+
+ if (format == end)
+ error ("Format string ends in middle of format specifier");
+@@ -3605,7 +3607,7 @@ usage: (format STRING &rest OBJECTS) */
+ && *format != 'i' && *format != 'X' && *format != 'c')
+ error ("Invalid format operation %%%c", *format);
+
+- thissize = 30;
++ thissize = 30 + (precision[n] > 0 ? precision[n] : 0);
+ if (*format == 'c')
+ {
+ if (! SINGLE_BYTE_CHAR_P (XINT (args[n]))
+@@ -3803,23 +3805,35 @@ usage: (format STRING &rest OBJECTS) */
+ format - this_format_start);
+ this_format[format - this_format_start] = 0;
+
+- if (INTEGERP (args[n]))
++ if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g')
++ sprintf (p, this_format, XFLOAT_DATA (args[n]));
++ else
+ {
+- if (format[-1] == 'd')
+- sprintf (p, this_format, XINT (args[n]));
+- /* Don't sign-extend for octal or hex printing. */
++ if (sizeof (EMACS_INT) > sizeof (int))
++ {
++ /* Insert 'l' before format spec. */
++ this_format[format - this_format_start]
++ = this_format[format - this_format_start - 1];
++ this_format[format - this_format_start - 1] = 'l';
++ this_format[format - this_format_start + 1] = 0;
++ }
++
++ if (INTEGERP (args[n]))
++ {
++ if (format[-1] == 'd')
++ sprintf (p, this_format, XINT (args[n]));
++ /* Don't sign-extend for octal or hex printing. */
++ else
++ sprintf (p, this_format, XUINT (args[n]));
++ }
++ else if (format[-1] == 'd')
++ /* Maybe we should use "%1.0f" instead so it also works
++ for values larger than MAXINT. */
++ sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n]));
+ else
+- sprintf (p, this_format, XUINT (args[n]));
++ /* Don't sign-extend for octal or hex printing. */
++ sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n]));
+ }
+- else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g')
+- sprintf (p, this_format, XFLOAT_DATA (args[n]));
+- else if (format[-1] == 'd')
+- /* Maybe we should use "%1.0f" instead so it also works
+- for values larger than MAXINT. */
+- sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n]));
+- else
+- /* Don't sign-extend for octal or hex printing. */
+- sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n]));
+
+ if (p > buf
+ && multibyte