emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114076: Minor cleanup to avoid forward declarations


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r114076: Minor cleanup to avoid forward declarations.
Date: Fri, 30 Aug 2013 12:18:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114076
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-08-30 16:17:44 +0400
message:
  Minor cleanup to avoid forward declarations.
  * coding.h (struct ccl_spec): Remove forward declaration.
  * composite.h (toplevel): Include font.h.
  (struct composition_it, struct face, struct font_metrics):
  Remove forward declaration.
  * dispextern.h (struct image, struct atimer): Likewise.
  * emacsgtkfixed.h (struct frame): Likewise.
  * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
  * font.h (struct font_driver, struct font, struct glyph_string)
  (struct face): Remove forward declaration.
  * fontset.h (struct face, struct font): Likewise.
  * frame.h (toplevel): Style cleanup.
  (enum output_method): Move to...
  * termhooks.h (enum output_method): ...here.
  (struct glyph, struct frame, struct ns_display_info)
  (struct x_display_info, struct w32_display_info):
  Remove forward declaration.
  * xterm.h (toplevel): Include termhooks.h.
  (struct font, struct window, struct glyph_matrix, struct frame)
  (struct input_event, struct face, struct image): Remove forward
  declaration.
  * gtkutil.h (struct _widget_value): Likewise.
  * keyboard.h (toplevel): Include termhooks.h.
  (struct input_event): Remove forward declaration.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/coding.h                   coding.h-20091113204419-o5vbwnq5f7feedwu-1078
  src/composite.h                
composite.h-20091113204419-o5vbwnq5f7feedwu-1729
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/emacsgtkfixed.c            
emacsgtkfixed.c-20110614203741-zy59ua04aeb4gvn1-1
  src/emacsgtkfixed.h            
emacsgtkfixed.h-20110614203741-zy59ua04aeb4gvn1-2
  src/font.h                     font.h-20091113204419-o5vbwnq5f7feedwu-8541
  src/fontset.h                  fontset.h-20091113204419-o5vbwnq5f7feedwu-1080
  src/frame.h                    frame.h-20091113204419-o5vbwnq5f7feedwu-229
  src/gtkutil.h                  gtkutil.h-20091113204419-o5vbwnq5f7feedwu-2528
  src/keyboard.h                 keyboard.h-20091113204419-o5vbwnq5f7feedwu-450
  src/termhooks.h                termhooks.h-20091113204419-o5vbwnq5f7feedwu-249
  src/xterm.h                    xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-08-29 16:36:54 +0000
+++ b/src/ChangeLog     2013-08-30 12:17:44 +0000
@@ -1,3 +1,30 @@
+2013-08-30  Dmitry Antipov  <address@hidden>
+
+       Minor cleanup to avoid forward declarations.
+       * coding.h (struct ccl_spec): Remove forward declaration.
+       * composite.h (toplevel): Include font.h.
+       (struct composition_it, struct face, struct font_metrics):
+       Remove forward declaration.
+       * dispextern.h (struct image, struct atimer): Likewise.
+       * emacsgtkfixed.h (struct frame): Likewise.
+       * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
+       * font.h (struct font_driver, struct font, struct glyph_string)
+       (struct face): Remove forward declaration.
+       * fontset.h (struct face, struct font): Likewise.
+       * frame.h (toplevel): Style cleanup.
+       (enum output_method): Move to...
+       * termhooks.h (enum output_method): ...here.
+       (struct glyph, struct frame, struct ns_display_info)
+       (struct x_display_info, struct w32_display_info):
+       Remove forward declaration.
+       * xterm.h (toplevel): Include termhooks.h.
+       (struct font, struct window, struct glyph_matrix, struct frame)
+       (struct input_event, struct face, struct image): Remove forward
+       declaration.
+       * gtkutil.h (struct _widget_value): Likewise.
+       * keyboard.h (toplevel): Include termhooks.h.
+       (struct input_event): Remove forward declaration.
+
 2013-08-29  Dmitry Antipov  <address@hidden>
 
        * intervals.c (set_point_from_marker): New function.

=== modified file 'src/coding.h'
--- a/src/coding.h      2013-06-29 15:52:20 +0000
+++ b/src/coding.h      2013-08-30 12:17:44 +0000
@@ -378,8 +378,6 @@
   struct composition_status cmp_status;
 };
 
-struct ccl_spec;
-
 struct undecided_spec
 {
   /* Inhibit null byte detection.  1 means always inhibit,

=== modified file 'src/composite.h'
--- a/src/composite.h   2013-08-03 21:09:57 +0000
+++ b/src/composite.h   2013-08-30 12:17:44 +0000
@@ -25,6 +25,8 @@
 #ifndef EMACS_COMPOSITE_H
 #define EMACS_COMPOSITE_H
 
+#include "font.h"
+
 INLINE_HEADER_BEGIN
 #ifndef COMPOSITE_INLINE
 # define COMPOSITE_INLINE INLINE
@@ -312,10 +314,6 @@
 #define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
                           ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
 
-struct composition_it;
-struct face;
-struct font_metrics;
-
 extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
 extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
 extern bool composition_gstring_p (Lisp_Object);

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-08-28 11:00:03 +0000
+++ b/src/dispextern.h  2013-08-30 12:17:44 +0000
@@ -2869,11 +2869,6 @@
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-/* Structure forward declarations.  */
-
-struct image;
-
-
 /* Each image format (JPEG, TIFF, ...) supported is described by
    a structure of the type below.  */
 
@@ -3401,8 +3396,6 @@
 extern void start_hourglass (void);
 extern void cancel_hourglass (void);
 extern int hourglass_shown_p;
-
-struct atimer;                 /* Defined in atimer.h.  */
 /* If non-null, an asynchronous timer that, when it expires, displays
    an hourglass cursor on all frames.  */
 extern struct atimer *hourglass_atimer;

=== modified file 'src/emacsgtkfixed.c'
--- a/src/emacsgtkfixed.c       2013-07-23 06:38:51 +0000
+++ b/src/emacsgtkfixed.c       2013-08-30 12:17:44 +0000
@@ -20,12 +20,10 @@
 
 #include <config.h>
 
-#include "emacsgtkfixed.h"
-#include <stdio.h>
-
 #include "lisp.h"
 #include "frame.h"
 #include "xterm.h"
+#include "emacsgtkfixed.h"
 
 /* Silence a bogus diagnostic; see GNOME bug 683906.  */
 #if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)

=== modified file 'src/emacsgtkfixed.h'
--- a/src/emacsgtkfixed.h       2013-01-01 09:11:05 +0000
+++ b/src/emacsgtkfixed.h       2013-08-30 12:17:44 +0000
@@ -25,8 +25,6 @@
 
 G_BEGIN_DECLS
 
-struct frame;
-
 extern GtkWidget *emacs_fixed_new (struct frame *f);
 
 G_END_DECLS

=== modified file 'src/font.h'
--- a/src/font.h        2013-08-13 08:18:11 +0000
+++ b/src/font.h        2013-08-30 12:17:44 +0000
@@ -56,11 +56,6 @@
 
 extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
 
-
-struct font_driver;
-struct font;
-struct glyph_string;
-
 /* An enumerator for each font property.  This is used as an index to
    the vector of FONT-SPEC and FONT-ENTITY.
 
@@ -487,8 +482,6 @@
    this value.  */
 #define FONT_PIXEL_SIZE_QUANTUM 1
 
-struct face;
-
 #define FONT_INVALID_CODE 0xFFFFFFFF
 
 /* Font driver.  Members specified as "optional" can be NULL.  */

=== modified file 'src/fontset.h'
--- a/src/fontset.h     2013-08-03 03:29:03 +0000
+++ b/src/fontset.h     2013-08-30 12:17:44 +0000
@@ -26,8 +26,6 @@
 #ifndef EMACS_FONTSET_H
 #define EMACS_FONTSET_H
 
-struct face;
-
 extern void free_face_fontset (struct frame *, struct face *);
 extern int face_for_char (struct frame *, struct face *, int,
                           int, Lisp_Object);
@@ -42,7 +40,6 @@
 extern Lisp_Object fontset_name (int);
 extern Lisp_Object fontset_ascii (int);
 
-struct font;
 extern int face_for_font (struct frame *, Lisp_Object, struct face *);
 
 #endif /* EMACS_FONTSET_H */

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-08-23 04:03:25 +0000
+++ b/src/frame.h       2013-08-30 12:17:44 +0000
@@ -24,31 +24,13 @@
 #define EMACS_FRAME_H
 
 #include "dispextern.h"
+#include "termhooks.h"
 
 INLINE_HEADER_BEGIN
 #ifndef FRAME_INLINE
 # define FRAME_INLINE INLINE
 #endif
 
-
-/* Miscellanea.  */
-
-/* Nonzero means there is at least one garbaged frame.  */
-extern bool frame_garbaged;
-
-
-/* The structure representing a frame.  */
-
-enum output_method
-{
-  output_initial,
-  output_termcap,
-  output_x_window,
-  output_msdos_raw,
-  output_w32,
-  output_ns
-};
-
 enum vertical_scroll_bar_type
 {
   vertical_scroll_bar_none,
@@ -66,10 +48,7 @@
   FULLSCREEN_WAIT      = 0x100
 };
 
-
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
-
+/* The structure representing a frame.  */
 
 struct frame
 {
@@ -884,6 +863,9 @@
 #define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
 #define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
 
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
+
 /* Return a pointer to the face cache of frame F.  */
 
 #define FRAME_FACE_CACHE(F)    (F)->face_cache
@@ -950,6 +932,9 @@
 extern Lisp_Object Qterminal;
 extern Lisp_Object Qnoelisp;
 
+/* Nonzero means there is at least one garbaged frame.  */
+extern bool frame_garbaged;
+
 extern struct frame *last_nonminibuf_frame;
 
 extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);

=== modified file 'src/gtkutil.h'
--- a/src/gtkutil.h     2013-08-03 03:29:03 +0000
+++ b/src/gtkutil.h     2013-08-30 12:17:44 +0000
@@ -74,8 +74,6 @@
 
 } xg_menu_item_cb_data;
 
-struct _widget_value;
-
 extern struct _widget_value *malloc_widget_value (void);
 extern void free_widget_value (struct _widget_value *);
 

=== modified file 'src/keyboard.h'
--- a/src/keyboard.h    2013-08-27 18:47:55 +0000
+++ b/src/keyboard.h    2013-08-30 12:17:44 +0000
@@ -19,6 +19,7 @@
 
 #include "systime.h"           /* for struct timespec, Time */
 #include "coding.h"             /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
+#include "termhooks.h"
 
 INLINE_HEADER_BEGIN
 #ifndef KEYBOARD_INLINE
@@ -477,9 +478,6 @@
 /* The primary selection.  */
 extern Lisp_Object QPRIMARY;
 
-/* Forward declaration for prototypes.  */
-struct input_event;
-
 extern Lisp_Object parse_modifiers (Lisp_Object);
 extern Lisp_Object reorder_modifiers (Lisp_Object);
 extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,

=== modified file 'src/termhooks.h'
--- a/src/termhooks.h   2013-07-16 11:41:06 +0000
+++ b/src/termhooks.h   2013-08-30 12:17:44 +0000
@@ -18,7 +18,9 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#ifndef EMACS_TERMHOOKS_H
+#define EMACS_TERMHOOKS_H
+
 /* Miscellanea.   */
 
 #include "systime.h" /* for Time */
@@ -28,10 +30,6 @@
 # define TERMHOOKS_INLINE INLINE
 #endif
 
-struct glyph;
-struct frame;
-
-
 enum scroll_bar_part {
   scroll_bar_above_handle,
   scroll_bar_handle,
@@ -49,7 +47,18 @@
    may do something OS dependent, like extended window manager hints on X11.  
*/
 extern void (*fullscreen_hook) (struct frame *f);
 
-
+/* Output method of a terminal (and frames on this terminal, respectively).  */
+
+enum output_method
+{
+  output_initial,
+  output_termcap,
+  output_x_window,
+  output_msdos_raw,
+  output_w32,
+  output_ns
+};
+
 /* Input queue declarations and hooks.  */
 
 enum event_kind
@@ -321,11 +330,6 @@
 extern struct tty_display_info *gpm_tty;
 #endif
 
-
-struct ns_display_info;
-struct x_display_info;
-struct w32_display_info;
-
 /* Terminal-local parameters. */
 struct terminal
 {
@@ -660,3 +664,5 @@
 #endif
 
 INLINE_HEADER_END
+
+#endif /* EMACS_TERMHOOKS_H */

=== modified file 'src/xterm.h'
--- a/src/xterm.h       2013-08-29 07:27:27 +0000
+++ b/src/xterm.h       2013-08-30 12:17:44 +0000
@@ -20,8 +20,6 @@
 #ifndef XTERM_H
 #define XTERM_H
 
-#include "dispextern.h"
-
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
 
@@ -73,14 +71,13 @@
 #define USE_GTK_TOOLTIP
 #endif
 
-
-/* Bookkeeping to distinguish X versions.  */
-
-
 #ifdef HAVE_X_I18N
 #include <X11/Xlocale.h>
 #endif
-
+
+#include "dispextern.h"
+#include "termhooks.h"
+
 #define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
                                         XScreenNumberOfScreen (FRAME_X_SCREEN 
(f)))
 #define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
@@ -409,9 +406,6 @@
 
 extern void select_visual (struct x_display_info *);
 
-
-struct font;
-
 /* Each X frame object points to its own struct x_output object
    in the output_data.x field.  The x_output structure contains
    the information that is specific to X windows.  */
@@ -919,14 +913,6 @@
 #define SELECTION_EVENT_TIME(eventp)   \
   (((struct selection_input_event *) (eventp))->time)
 
-
-struct window;
-struct glyph_matrix;
-struct frame;
-struct input_event;
-struct face;
-struct image;
-
 /* From xselect.c.  */
 
 void x_handle_selection_notify (XSelectionEvent *);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]