all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Please install and ack
@ 2007-09-11 20:31 Richard Stallman
  2007-09-12 10:08 ` Johannes Weiner
  2007-09-16  8:56 ` Jan Djärv
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Stallman @ 2007-09-11 20:31 UTC (permalink / raw)
  To: emacs-devel

These are tiny changes by "Peter O'Gorman"
<bug-gnu-emacs@mlists.thewrittenword.com>.
Would someone please install them?


Index: src/xterm.c
===================================================================
--- src/xterm.c.orig	2007-05-25 12:43:35.000000000 +0000
+++ src/xterm.c	2007-08-31 03:43:32.106444418 +0000
@@ -155,7 +155,9 @@
 #endif
 #endif
 
+#ifndef abs
 #define abs(x)	((x) < 0 ? -(x) : (x))
+#endif
 
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
Index: src/keyboard.c
===================================================================
--- src/keyboard.c.orig	2007-04-01 21:54:54.000000000 +0000
+++ src/keyboard.c	2007-08-31 03:43:32.291971223 +0000
@@ -112,7 +112,9 @@
 #define KBD_BUFFER_SIZE 4096
 #endif	/* No X-windows */
 
+#ifndef abs
 #define abs(x)		((x) >= 0 ? (x) : -(x))
+#endif
 
 /* Following definition copied from eval.c */
 

===================================================================
--- src/gtkutil.c.orig	2007-05-14 14:56:31.000000000 +0000
+++ src/gtkutil.c	2007-09-03 20:58:27.261561563 +0000
@@ -1403,8 +1403,8 @@
     {
       Lisp_Object file;
       struct gcpro gcpro1;
-      GCPRO1 (file);
       char *utf8_filename;
+      GCPRO1 (file);
 
       file = build_string (default_filename);
 

    This should have -lBSD, but that library is said to make
Index: src/frame.h
===================================================================
--- src/frame.h.orig	2007-01-21 04:18:16.000000000 +0000
+++ src/frame.h	2007-09-06 18:18:37.784302154 +0000
@@ -1036,7 +1036,7 @@
   FULLSCREEN_WIDTH      = 1,
   FULLSCREEN_HEIGHT     = 2,
   FULLSCREEN_BOTH       = 3,
-  FULLSCREEN_WAIT       = 4,
+  FULLSCREEN_WAIT       = 4
 };
 
 
Index: src/termhooks.h
===================================================================
--- src/termhooks.h.orig	2007-01-14 03:24:37.000000000 +0000
+++ src/termhooks.h	2007-09-06 18:17:17.922589738 +0000
@@ -331,7 +331,7 @@
 
   /* Queued from XTread_socket when session manager sends
      save yourself before shutdown. */
-  SAVE_SESSION_EVENT,
+  SAVE_SESSION_EVENT
 
 #ifdef MAC_OS
   /* Generated when an Apple event, a HICommand event, or a Services
@@ -340,7 +340,7 @@
      symbols, respectively.  Member `arg' is a Lisp object converted
      from the received Apple event.  Parameters for non-Apple events
      are converted to those in Apple events.  */
-  MAC_APPLE_EVENT
+  ,MAC_APPLE_EVENT
 #endif
 };
 
Index: src/xfaces.c
===================================================================
--- src/xfaces.c.orig	2007-02-14 15:47:51.000000000 +0000
+++ src/xfaces.c	2007-09-06 18:17:56.728517424 +0000
@@ -263,9 +263,9 @@
 #endif /* HAVE_X_WINDOWS */
 
 #include <ctype.h>
-
+#ifndef abs
 #define abs(X)		((X) < 0 ? -(X) : (X))
-
+#endif
 /* Number of pt per inch (from the TeXbook).  */
 
 #define PT_PER_INCH 72.27

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-11 20:31 Please install and ack Richard Stallman
@ 2007-09-12 10:08 ` Johannes Weiner
  2007-09-12 14:05   ` Stefan Monnier
                     ` (2 more replies)
  2007-09-16  8:56 ` Jan Djärv
  1 sibling, 3 replies; 8+ messages in thread
From: Johannes Weiner @ 2007-09-12 10:08 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 876 bytes --]

Hi,

On Tue, Sep 11, 2007 at 04:31:51PM -0400, Richard Stallman wrote:
> --- src/xterm.c.orig	2007-05-25 12:43:35.000000000 +0000
> +++ src/xterm.c	2007-08-31 03:43:32.106444418 +0000
>  
> +#ifndef abs
>  #define abs(x)	((x) < 0 ? -(x) : (x))
> +#endif
>  
> --- src/keyboard.c.orig	2007-04-01 21:54:54.000000000 +0000
> +++ src/keyboard.c	2007-08-31 03:43:32.291971223 +0000
>  
> +#ifndef abs
>  #define abs(x)		((x) >= 0 ? (x) : -(x))
> +#endif
>  
> --- src/xfaces.c.orig	2007-02-14 15:47:51.000000000 +0000
> +++ src/xfaces.c	2007-09-06 18:17:56.728517424 +0000
>
> -
> +#ifndef abs
>  #define abs(X)		((X) < 0 ? -(X) : (X))
> -
> +#endif

Wouldn't it be better to centralize that macro?  It's trivial, sure.  But
repetition is not beautiful.  I have a patch attached, but I'm not quite sure
if config.h is the place to do this..

	Hannes

[-- Attachment #1.1.2: emacs-centralize-abs-definition.patch --]
[-- Type: text/x-diff, Size: 3340 bytes --]

Index: configure.in
===================================================================
RCS file: /sources/emacs/emacs/configure.in,v
retrieving revision 1.474
diff -u -r1.474 configure.in
--- configure.in	12 Sep 2007 07:03:30 -0000	1.474
+++ configure.in	12 Sep 2007 09:58:33 -0000
@@ -2729,7 +2729,7 @@
 AC_CHECK_FUNCS(gethostname getdomainname dup2 \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
-strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
+strerror fpathconf select mktime euidaccess getpagesize tzset setlocale abs \
 utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
@@ -3375,6 +3375,10 @@
 #define BCMP memcmp
 #endif
 
+#ifndef HAVE_ABS
+#define abs(x) ((x) < 0 ? -(x) : (x))
+#endif
+
 #endif /* EMACS_CONFIG_H */
 
 /*
Index: src/keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.913
diff -u -r1.913 keyboard.c
--- src/keyboard.c	12 Sep 2007 07:19:55 -0000	1.913
+++ src/keyboard.c	12 Sep 2007 09:58:47 -0000
@@ -108,8 +108,6 @@
 #define KBD_BUFFER_SIZE 4096
 #endif	/* No X-windows */
 
-#define abs(x)		((x) >= 0 ? (x) : -(x))
-
 /* Following definition copied from eval.c */
 
 struct backtrace
Index: src/sound.c
===================================================================
RCS file: /sources/emacs/emacs/src/sound.c,v
retrieving revision 1.45
diff -u -r1.45 sound.c
--- src/sound.c	26 Jul 2007 05:27:56 -0000	1.45
+++ src/sound.c	12 Sep 2007 09:58:48 -0000
@@ -96,9 +96,6 @@
 
 #endif /* WINDOWSNT */
 
-/* BEGIN: Common Definitions */
-#define abs(X)    ((X) < 0 ? -(X) : (X))
-
 /* Symbols.  */
 
 extern Lisp_Object QCfile, QCdata;
Index: src/w32term.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32term.c,v
retrieving revision 1.265
diff -u -r1.265 w32term.c
--- src/w32term.c	4 Sep 2007 21:38:40 -0000	1.265
+++ src/w32term.c	12 Sep 2007 09:58:48 -0000
@@ -58,8 +58,6 @@
 #include "composite.h"
 #include "coding.h"
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 \f
 /* Fringe bitmaps.  */
 
Index: src/xfaces.c
===================================================================
RCS file: /sources/emacs/emacs/src/xfaces.c,v
retrieving revision 1.364
diff -u -r1.364 xfaces.c
--- src/xfaces.c	29 Aug 2007 21:46:05 -0000	1.364
+++ src/xfaces.c	12 Sep 2007 09:58:48 -0000
@@ -267,8 +267,6 @@
 
 #include <ctype.h>
 
-#define abs(X)		((X) < 0 ? -(X) : (X))
-
 /* Number of pt per inch (from the TeXbook).  */
 
 #define PT_PER_INCH 72.27
Index: src/xterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/xterm.c,v
retrieving revision 1.956
diff -u -r1.956 xterm.c
--- src/xterm.c	10 Sep 2007 21:25:32 -0000	1.956
+++ src/xterm.c	12 Sep 2007 09:58:48 -0000
@@ -154,8 +154,6 @@
 #endif
 #endif
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
 int use_xim = 1;

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-12 10:08 ` Johannes Weiner
@ 2007-09-12 14:05   ` Stefan Monnier
  2007-09-12 20:02     ` Johannes Weiner
  2007-09-12 18:52   ` Richard Stallman
  2007-10-03 13:35   ` Jason Rumney
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-09-12 14:05 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

> Wouldn't it be better to centralize that macro?  It's trivial, sure.  But
> repetition is not beautiful.  I have a patch attached, but I'm not quite sure
> if config.h is the place to do this..

I'd put it in lisp.h


        Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-12 10:08 ` Johannes Weiner
  2007-09-12 14:05   ` Stefan Monnier
@ 2007-09-12 18:52   ` Richard Stallman
  2007-10-03 13:35   ` Jason Rumney
  2 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2007-09-12 18:52 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: emacs-devel

    Wouldn't it be better to centralize that macro?  It's trivial, sure.  But
    repetition is not beautiful.  I have a patch attached, but I'm not quite su=
    re
    if config.h is the place to do this..

Definitely not.  lisp.h might be ok, if someone wants to do this.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-12 14:05   ` Stefan Monnier
@ 2007-09-12 20:02     ` Johannes Weiner
  2007-09-12 20:08       ` Johannes Weiner
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Weiner @ 2007-09-12 20:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Richard Stallman, emacs-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 335 bytes --]

Hi,

On Wed, Sep 12, 2007 at 10:05:31AM -0400, Stefan Monnier wrote:
> > Wouldn't it be better to centralize that macro?  It's trivial, sure.  But
> > repetition is not beautiful.  I have a patch attached, but I'm not quite sure
> > if config.h is the place to do this..
> 
> I'd put it in lisp.h

Ok, second try.

	Hannes

[-- Attachment #1.1.2: emacs-centralize-abs-r1.patch --]
[-- Type: text/x-diff, Size: 2264 bytes --]

diff -Naur emacs.orig/src/keyboard.c emacs/src/keyboard.c
--- emacs.orig/src/keyboard.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/keyboard.c	2007-09-12 21:53:35.000000000 +0200
@@ -108,8 +108,6 @@
 #define KBD_BUFFER_SIZE 4096
 #endif	/* No X-windows */
 
-#define abs(x)		((x) >= 0 ? (x) : -(x))
-
 /* Following definition copied from eval.c */
 
 struct backtrace
diff -Naur emacs.orig/src/lisp.h emacs/src/lisp.h
--- emacs.orig/src/lisp.h	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/lisp.h	2007-09-12 21:59:41.000000000 +0200
@@ -3389,6 +3389,12 @@
 #define min(a, b)	((a) < (b) ? (a) : (b))
 #define max(a, b)	((a) > (b) ? (a) : (b))
 
+/* Make sure we have abs defined */
+
+#if defined(abs)
+#define abs(x)		((x) < 0 ? -(x) : (x))
+#endif
+
 /* Return a fixnum or float, depending on whether VAL fits in a Lisp
    fixnum.  */
 
diff -Naur emacs.orig/src/sound.c emacs/src/sound.c
--- emacs.orig/src/sound.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/sound.c	2007-09-12 21:53:47.000000000 +0200
@@ -96,9 +96,6 @@
 
 #endif /* WINDOWSNT */
 
-/* BEGIN: Common Definitions */
-#define abs(X)    ((X) < 0 ? -(X) : (X))
-
 /* Symbols.  */
 
 extern Lisp_Object QCfile, QCdata;
diff -Naur emacs.orig/src/w32term.c emacs/src/w32term.c
--- emacs.orig/src/w32term.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/w32term.c	2007-09-12 21:54:03.000000000 +0200
@@ -58,8 +58,6 @@
 #include "composite.h"
 #include "coding.h"
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 \f
 /* Fringe bitmaps.  */
 
diff -Naur emacs.orig/src/xfaces.c emacs/src/xfaces.c
--- emacs.orig/src/xfaces.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/xfaces.c	2007-09-12 21:54:14.000000000 +0200
@@ -267,8 +267,6 @@
 
 #include <ctype.h>
 
-#define abs(X)		((X) < 0 ? -(X) : (X))
-
 /* Number of pt per inch (from the TeXbook).  */
 
 #define PT_PER_INCH 72.27
diff -Naur emacs.orig/src/xterm.c emacs/src/xterm.c
--- emacs.orig/src/xterm.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/xterm.c	2007-09-12 21:54:22.000000000 +0200
@@ -154,8 +154,6 @@
 #endif
 #endif
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
 int use_xim = 1;

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-12 20:02     ` Johannes Weiner
@ 2007-09-12 20:08       ` Johannes Weiner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Weiner @ 2007-09-12 20:08 UTC (permalink / raw)
  To: Stefan Monnier, Richard Stallman, emacs-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 27 bytes --]

Hi,

sorry, typo.

	Hannes

[-- Attachment #1.1.2: emacs-centralize-abs-r2.patch --]
[-- Type: text/x-diff, Size: 2265 bytes --]

diff -Naur emacs.orig/src/keyboard.c emacs/src/keyboard.c
--- emacs.orig/src/keyboard.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/keyboard.c	2007-09-12 21:53:35.000000000 +0200
@@ -108,8 +108,6 @@
 #define KBD_BUFFER_SIZE 4096
 #endif	/* No X-windows */
 
-#define abs(x)		((x) >= 0 ? (x) : -(x))
-
 /* Following definition copied from eval.c */
 
 struct backtrace
diff -Naur emacs.orig/src/lisp.h emacs/src/lisp.h
--- emacs.orig/src/lisp.h	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/lisp.h	2007-09-12 22:05:58.000000000 +0200
@@ -3389,6 +3389,12 @@
 #define min(a, b)	((a) < (b) ? (a) : (b))
 #define max(a, b)	((a) > (b) ? (a) : (b))
 
+/* Make sure we have abs defined */
+
+#if !defined(abs)
+#define abs(x)		((x) < 0 ? -(x) : (x))
+#endif
+
 /* Return a fixnum or float, depending on whether VAL fits in a Lisp
    fixnum.  */
 
diff -Naur emacs.orig/src/sound.c emacs/src/sound.c
--- emacs.orig/src/sound.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/sound.c	2007-09-12 21:53:47.000000000 +0200
@@ -96,9 +96,6 @@
 
 #endif /* WINDOWSNT */
 
-/* BEGIN: Common Definitions */
-#define abs(X)    ((X) < 0 ? -(X) : (X))
-
 /* Symbols.  */
 
 extern Lisp_Object QCfile, QCdata;
diff -Naur emacs.orig/src/w32term.c emacs/src/w32term.c
--- emacs.orig/src/w32term.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/w32term.c	2007-09-12 21:54:03.000000000 +0200
@@ -58,8 +58,6 @@
 #include "composite.h"
 #include "coding.h"
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 \f
 /* Fringe bitmaps.  */
 
diff -Naur emacs.orig/src/xfaces.c emacs/src/xfaces.c
--- emacs.orig/src/xfaces.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/xfaces.c	2007-09-12 21:54:14.000000000 +0200
@@ -267,8 +267,6 @@
 
 #include <ctype.h>
 
-#define abs(X)		((X) < 0 ? -(X) : (X))
-
 /* Number of pt per inch (from the TeXbook).  */
 
 #define PT_PER_INCH 72.27
diff -Naur emacs.orig/src/xterm.c emacs/src/xterm.c
--- emacs.orig/src/xterm.c	2007-09-12 22:00:06.000000000 +0200
+++ emacs/src/xterm.c	2007-09-12 21:54:22.000000000 +0200
@@ -154,8 +154,6 @@
 #endif
 #endif
 
-#define abs(x)	((x) < 0 ? -(x) : (x))
-
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
 int use_xim = 1;

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-11 20:31 Please install and ack Richard Stallman
  2007-09-12 10:08 ` Johannes Weiner
@ 2007-09-16  8:56 ` Jan Djärv
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Djärv @ 2007-09-16  8:56 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman skrev:
> These are tiny changes by "Peter O'Gorman"
> <bug-gnu-emacs@mlists.thewrittenword.com>.
> Would someone please install them?

Ack.

	Jan D.

> 
> 
> Index: src/xterm.c
> ===================================================================
> --- src/xterm.c.orig	2007-05-25 12:43:35.000000000 +0000
> +++ src/xterm.c	2007-08-31 03:43:32.106444418 +0000
> @@ -155,7 +155,9 @@
>  #endif
>  #endif
>  
> +#ifndef abs
>  #define abs(x)	((x) < 0 ? -(x) : (x))
> +#endif
>  
>  /* Default to using XIM if available.  */
>  #ifdef USE_XIM
> Index: src/keyboard.c
> ===================================================================
> --- src/keyboard.c.orig	2007-04-01 21:54:54.000000000 +0000
> +++ src/keyboard.c	2007-08-31 03:43:32.291971223 +0000
> @@ -112,7 +112,9 @@
>  #define KBD_BUFFER_SIZE 4096
>  #endif	/* No X-windows */
>  
> +#ifndef abs
>  #define abs(x)		((x) >= 0 ? (x) : -(x))
> +#endif
>  
>  /* Following definition copied from eval.c */
>  
> 
> ===================================================================
> --- src/gtkutil.c.orig	2007-05-14 14:56:31.000000000 +0000
> +++ src/gtkutil.c	2007-09-03 20:58:27.261561563 +0000
> @@ -1403,8 +1403,8 @@
>      {
>        Lisp_Object file;
>        struct gcpro gcpro1;
> -      GCPRO1 (file);
>        char *utf8_filename;
> +      GCPRO1 (file);
>  
>        file = build_string (default_filename);
>  
> 
>     This should have -lBSD, but that library is said to make
> Index: src/frame.h
> ===================================================================
> --- src/frame.h.orig	2007-01-21 04:18:16.000000000 +0000
> +++ src/frame.h	2007-09-06 18:18:37.784302154 +0000
> @@ -1036,7 +1036,7 @@
>    FULLSCREEN_WIDTH      = 1,
>    FULLSCREEN_HEIGHT     = 2,
>    FULLSCREEN_BOTH       = 3,
> -  FULLSCREEN_WAIT       = 4,
> +  FULLSCREEN_WAIT       = 4
>  };
>  
>  
> Index: src/termhooks.h
> ===================================================================
> --- src/termhooks.h.orig	2007-01-14 03:24:37.000000000 +0000
> +++ src/termhooks.h	2007-09-06 18:17:17.922589738 +0000
> @@ -331,7 +331,7 @@
>  
>    /* Queued from XTread_socket when session manager sends
>       save yourself before shutdown. */
> -  SAVE_SESSION_EVENT,
> +  SAVE_SESSION_EVENT
>  
>  #ifdef MAC_OS
>    /* Generated when an Apple event, a HICommand event, or a Services
> @@ -340,7 +340,7 @@
>       symbols, respectively.  Member `arg' is a Lisp object converted
>       from the received Apple event.  Parameters for non-Apple events
>       are converted to those in Apple events.  */
> -  MAC_APPLE_EVENT
> +  ,MAC_APPLE_EVENT
>  #endif
>  };
>  
> Index: src/xfaces.c
> ===================================================================
> --- src/xfaces.c.orig	2007-02-14 15:47:51.000000000 +0000
> +++ src/xfaces.c	2007-09-06 18:17:56.728517424 +0000
> @@ -263,9 +263,9 @@
>  #endif /* HAVE_X_WINDOWS */
>  
>  #include <ctype.h>
> -
> +#ifndef abs
>  #define abs(X)		((X) < 0 ? -(X) : (X))
> -
> +#endif
>  /* Number of pt per inch (from the TeXbook).  */
>  
>  #define PT_PER_INCH 72.27
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please install and ack
  2007-09-12 10:08 ` Johannes Weiner
  2007-09-12 14:05   ` Stefan Monnier
  2007-09-12 18:52   ` Richard Stallman
@ 2007-10-03 13:35   ` Jason Rumney
  2 siblings, 0 replies; 8+ messages in thread
From: Jason Rumney @ 2007-10-03 13:35 UTC (permalink / raw)
  To: hannes, emacs-devel

Johannes Weiner wrote:
>> --- src/xterm.c.orig	2007-05-25 12:43:35.000000000 +0000
>> +++ src/xterm.c	2007-08-31 03:43:32.106444418 +0000
>>  
>> +#ifndef abs
>>  #define abs(x)	((x) < 0 ? -(x) : (x))
>> +#endif
>>     

> Wouldn't it be better to centralize that macro?  It's trivial, sure.  But
> repetition is not beautiful.

Rather than centralising it, which has caused problems with at least one
compiler due to the order of includes, and the fact that the system
headers do not protect against redefinition with an #ifdef abs, wouldn't
it be better to include <stdlib.h> in those files that require it?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-10-03 13:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11 20:31 Please install and ack Richard Stallman
2007-09-12 10:08 ` Johannes Weiner
2007-09-12 14:05   ` Stefan Monnier
2007-09-12 20:02     ` Johannes Weiner
2007-09-12 20:08       ` Johannes Weiner
2007-09-12 18:52   ` Richard Stallman
2007-10-03 13:35   ` Jason Rumney
2007-09-16  8:56 ` Jan Djärv

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.