qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs Makefile parser.c qe.c qe.h


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs Makefile parser.c qe.c qe.h
Date: Mon, 03 Feb 2014 20:03:08 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/02/03 20:03:08

Modified files:
        .              : Makefile parser.c qe.c qe.h 

Log message:
        compile parser.c separately
        
        * publish parse_config_file() and parse_arg()
        * change Makefile to compile objects for tiny version separately

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/Makefile?cvsroot=qemacs&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/qemacs/parser.c?cvsroot=qemacs&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.141&r2=1.142
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.133&r2=1.134

Patches:
Index: Makefile
===================================================================
RCS file: /sources/qemacs/qemacs/Makefile,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- Makefile    2 Feb 2014 14:29:36 -0000       1.61
+++ Makefile    3 Feb 2014 20:03:07 -0000       1.62
@@ -55,8 +55,9 @@
 TARGETLIBS:=
 TARGETS+= qe$(EXE) tqe$(EXE) kmaps ligatures
 
-OBJS= qe.o charset.o buffer.o input.o display.o util.o hex.o list.o cutils.o
-TOBJS= tqe.o charset.o buffer.o input.o display.o util.o hex.o list.o cutils.o
+OBJS:= qe.o parser.o charset.o buffer.o input.o display.o util.o hex.o \
+       list.o cutils.o
+TOBJS:= $(OBJS)
 
 OBJS+= extras.o
 
@@ -80,10 +81,8 @@
 endif
 
 ifdef CONFIG_WIN32
-  OBJS+= unix.o
-  TOBJS+= unix.o
-  OBJS+= win32.o
-  TOBJS+= win32.o
+  OBJS+= unix.o win32.o
+  TOBJS+= unix.o win32.o
 #  OBJS+= printf.o
 #  TOBJS+= printf.o
   LIBS+= -lmsvcrt -lgdi32 -lwsock32
@@ -107,9 +106,7 @@
 endif
 
 # more charsets if needed
-ifndef CONFIG_TINY
-  OBJS+= charsetjis.o charsetmore.o
-endif
+OBJS+= charsetjis.o charsetmore.o
 
 ifdef CONFIG_ALL_MODES
   OBJS+= unihex.o clang.o xml.o bufed.o \
@@ -162,16 +159,16 @@
 
 SRCS:= $(OBJS:.o=.c)
 TSRCS:= $(TOBJS:.o=.c)
-TSRCS:= $(TSRCS:tqe.c=qe.c)
 
 DEPENDS:= qe.h config.h cutils.h display.h qestyles.h config.mak
 DEPENDS:= $(addprefix $(DEPTH)/, $(DEPENDS))
 
 OBJS_DIR:= $(DEPTH)/.objs
+TOBJS_DIR:= $(DEPTH)/.tobjs
 OBJS:= $(addprefix $(OBJS_DIR)/, $(OBJS))
-TOBJS:= $(addprefix $(OBJS_DIR)/, $(TOBJS))
+TOBJS:= $(addprefix $(TOBJS_DIR)/, $(TOBJS))
 
-$(shell mkdir -p $(OBJS_DIR))
+$(shell mkdir -p $(OBJS_DIR) $(TOBJS_DIR))
 
 #
 # Dependencies
@@ -206,15 +203,12 @@
        echo `size address@hidden `wc -c address@hidden tqe $(OPTIONS) \
                | cut -d ' ' -f 7-10,13,15-40 >> STATS
 
-$(OBJS_DIR)/tqe.o: qe.c parser.c qeconfig.h variables.h $(DEPENDS) Makefile
-       $(CC) $(DEFINES) -DCONFIG_TINY $(CFLAGS) -o $@ -c $<
-
 ffplay$(EXE): qe$(EXE) Makefile
        ln -sf $< $@
 
 ifndef CONFIG_INIT_CALLS
 $(OBJS_DIR)/qe.o: allmodules.txt
-$(OBJS_DIR)/tqe.o: basemodules.txt
+$(TOBJS_DIR)/qe.o: basemodules.txt
 endif
 
 allmodules.txt: $(SRCS) Makefile
@@ -230,18 +224,33 @@
 $(OBJS_DIR)/cfb.o: cfb.c cfb.h fbfrender.h
 $(OBJS_DIR)/charsetjis.o: charsetjis.c charsetjis.def
 $(OBJS_DIR)/fbfrender.o: fbfrender.c fbfrender.h libfbf.h
-$(OBJS_DIR)/qe.o: qe.c parser.c qeconfig.h qe.h qfribidi.h variables.h
+$(OBJS_DIR)/qe.o: qe.c parser.c qeconfig.h qfribidi.h variables.h
 $(OBJS_DIR)/qfribidi.o: qfribidi.c qfribidi.h
 
+$(TOBJS_DIR)/cfb.o: cfb.c cfb.h fbfrender.h
+$(TOBJS_DIR)/charsetjis.o: charsetjis.c charsetjis.def
+$(TOBJS_DIR)/fbfrender.o: fbfrender.c fbfrender.h libfbf.h
+$(TOBJS_DIR)/qe.o: qe.c parser.c qeconfig.h qfribidi.h variables.h
+$(TOBJS_DIR)/qfribidi.o: qfribidi.c qfribidi.h
+
 $(OBJS_DIR)/%.o: %.c $(DEPENDS) Makefile
        $(CC) $(DEFINES) $(CFLAGS) -o $@ -c $<
 
+$(TOBJS_DIR)/%.o: %.c $(DEPENDS) Makefile
+       $(CC) $(DEFINES) -DCONFIG_TINY $(CFLAGS) -o $@ -c $<
+
 $(OBJS_DIR)/haiku.o: haiku.cpp $(DEPENDS) Makefile
        g++ $(DEFINES) $(CFLAGS) -Wno-multichar -o $@ -c $<
 
+$(TOBJS_DIR)/haiku.o: haiku.cpp $(DEPENDS) Makefile
+       g++ $(DEFINES) -DCONFIG_TINY $(CFLAGS) -Wno-multichar -o $@ -c $<
+
 %.s: %.c $(DEPENDS) Makefile
        $(CC) $(DEFINES) $(CFLAGS) -o $@ -S $<
 
+%.s: %.cpp $(DEPENDS) Makefile
+       g++ $(DEFINES) $(CFLAGS) -Wno-multichar -o $@ -S $<
+
 #
 # Test for bidir algorithm
 #
@@ -371,7 +380,7 @@
           $(OBJS_DIR)/*.o
 
 distclean: clean
-       rm -rf config.h config.mak $(OBJS_DIR)
+       rm -rf config.h config.mak $(OBJS_DIR) $(TOBJS_DIR)
 
 install: $(TARGETS) qe.1
        $(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/bin

Index: parser.c
===================================================================
RCS file: /sources/qemacs/qemacs/parser.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- parser.c    2 Feb 2014 14:29:36 -0000       1.1
+++ parser.c    3 Feb 2014 20:03:07 -0000       1.2
@@ -19,6 +19,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "qe.h"
+#include "variables.h"
+
 /* config file parsing */
 
 /* CG: error messages should go to the *error* buffer.

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -b -r1.141 -r1.142
--- qe.c        2 Feb 2014 14:29:36 -0000       1.141
+++ qe.c        3 Feb 2014 20:03:07 -0000       1.142
@@ -3693,7 +3693,7 @@
 }
 
 /* return -1 if error, 0 if no more args, 1 if one arg parsed */
-static int parse_arg(const char **pp, unsigned char *argtype,
+int parse_arg(const char **pp, unsigned char *argtype,
                      char *prompt, int prompt_size,
                      char *completion, int completion_size,
                      char *history, int history_size)
@@ -7268,8 +7268,6 @@
 
 /******************************************************/
 
-#include "parser.c"
-
 void do_load_config_file(EditState *e, const char *file)
 {
     QEmacsState *qs = e->qe_state;

Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -b -r1.133 -r1.134
--- qe.h        1 Feb 2014 12:49:06 -0000       1.133
+++ qe.h        3 Feb 2014 20:03:07 -0000       1.134
@@ -1772,6 +1772,10 @@
                         const char *system_fonts);
 void call_func(CmdSig sig, CmdProto func, int nb_args, CmdArg *args,
                unsigned char *args_type);
+int parse_arg(const char **pp, unsigned char *argtype,
+              char *prompt, int prompt_size,
+              char *completion, int completion_size,
+              char *history, int history_size);
 void exec_command(EditState *s, CmdDef *d, int argval, int key);
 void do_execute_command(EditState *s, const char *cmd, int argval);
 void window_display(EditState *s);
@@ -1820,6 +1824,13 @@
 void set_user_option(const char *user);
 void set_tty_charset(const char *name);
 
+/* parser.c */
+
+int parse_config_file(EditState *s, const char *filename);
+void do_eval_expression(EditState *s, const char *expression);
+void do_eval_region(EditState *s);
+void do_eval_buffer(EditState *s);
+
 /* extras.c */
 
 void do_compare_windows(EditState *s, int argval);



reply via email to

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