qemacs-commit
[Top][All Lists]
Advanced

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

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


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.h qe.c
Date: Thu, 17 Apr 2008 08:15:20 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        08/04/17 08:15:20

Modified files:
        .              : qe.h qe.c 

Log message:
        added str_credits and str_version to share between usage and help

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.83&r2=1.84
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.83&r2=1.84

Patches:
Index: qe.h
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- qe.h        13 Apr 2008 17:31:46 -0000      1.83
+++ qe.h        17 Apr 2008 08:15:19 -0000      1.84
@@ -121,6 +121,9 @@
 /* Size for a command name buffer */
 #define MAX_CMDNAME_SIZE     32
 
+extern const char str_version[];
+extern const char str_credits[];
+
 /* low level I/O events */
 void set_read_handler(int fd, void (*cb)(void *opaque), void *opaque);
 void set_write_handler(int fd, void (*cb)(void *opaque), void *opaque);
@@ -277,6 +280,8 @@
 int strtokey(const char **pp);
 int strtokeys(const char *keystr, unsigned int *keys, int max_keys);
 void keytostr(char *buf, int buf_size, int key);
+const char *keys_to_str(char *buf, int buf_size,
+                        unsigned int *keys, int nb_keys);
 int to_hex(int key);
 void color_completion(CompleteState *cp);
 int css_define_color(const char *name, const char *value);

Index: qe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- qe.c        15 Apr 2008 23:24:03 -0000      1.83
+++ qe.c        17 Apr 2008 08:15:20 -0000      1.84
@@ -4045,7 +4045,7 @@
     qs->macro_keys[qs->nb_macro_keys++] = key;
 }
 
-static const char *keys_to_str(char *buf, int buf_size,
+const char *keys_to_str(char *buf, int buf_size,
                                unsigned int *keys, int nb_keys)
 {
     char buf1[64];
@@ -7394,14 +7394,17 @@
 
 /******************************************************/
 
+const char str_version[] = "QEmacs version " QE_VERSION;
+const char str_credits[] = "Copyright (c) 2000-2003 Fabrice Bellard\n"
+                           "Copyright (c) 2000-2008 Charlie Gordon\n";
+
 static void show_version(void)
 {
-    printf("QEmacs version " QE_VERSION "\n"
-           "Copyright (c) 2000-2003 Fabrice Bellard\n"
-           "Copyright (c) 2000-2008 Charlie Gordon\n"
+    printf("%s\n%s\n"
            "QEmacs comes with ABSOLUTELY NO WARRANTY.\n"
            "You may redistribute copies of QEmacs\n"
-           "under the terms of the GNU Lesser General Public License.\n");
+           "under the terms of the GNU Lesser General Public License.\n",
+           str_version, str_credits);
     exit(1);
 }
 




reply via email to

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