pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] pspp/src/language ChangeLog command.c command.def


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/language ChangeLog command.c command.def
Date: Wed, 28 Jun 2006 18:40:22 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 06/06/28 18:40:22

Modified files:
        src/language   : ChangeLog command.c command.def 

Log message:
        Don't offer both the full and abbreviated names for a single command
        in command name completion.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/ChangeLog?cvsroot=pspp&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/command.c?cvsroot=pspp&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/command.def?cvsroot=pspp&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ChangeLog   28 Jun 2006 05:49:03 -0000      1.8
+++ ChangeLog   28 Jun 2006 18:40:21 -0000      1.9
@@ -1,3 +1,13 @@
+Wed Jun 28 11:38:23 2006  Ben Pfaff  <address@hidden>
+
+       Don't offer both the full and abbreviated names for a single
+       command in command name completion.
+       
+       * command.c: (enum flags) Add F_ABBREV flag.
+       (cmd_complete) Ignore command with F_ABBREV flag set.
+
+       * command.def: Add F_ABBREV to N, Q, SORT commands.
+
 Tue Jun 27 22:36:38 2006  Ben Pfaff  <address@hidden>
 
        Fix regression in command name completion reported by John

Index: command.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/command.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- command.c   28 Jun 2006 05:49:03 -0000      1.12
+++ command.c   28 Jun 2006 18:40:21 -0000      1.13
@@ -97,7 +97,8 @@
   {
     F_ENHANCED = 0x10,        /* Allowed only in enhanced syntax mode. */
     F_TESTING = 0x20,         /* Allowed only in testing mode. */
-    F_KEEP_FINAL_TOKEN = 0x40 /* Don't skip final token in command name. */
+    F_KEEP_FINAL_TOKEN = 0x40,/* Don't skip final token in command name. */
+    F_ABBREV = 0x80           /* Not a candidate for name completion. */
   };
 
 /* A single command. */
@@ -632,6 +633,7 @@
     if (!memcasecmp ((*cmd)->name, prefix, strlen (prefix))
         && (!((*cmd)->flags & F_TESTING) || get_testing_mode ())
         && (!((*cmd)->flags & F_ENHANCED) || get_syntax () == ENHANCED)
+        && !((*cmd)->flags & F_ABBREV)
         && ((*cmd)->function != NULL)
         && in_correct_state (*cmd, completion_state))
       return (*cmd)++->name;

Index: command.def
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/command.def,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- command.def 6 May 2006 20:27:23 -0000       1.5
+++ command.def 28 Jun 2006 18:40:21 -0000      1.6
@@ -29,10 +29,10 @@
 DEF_CMD (S_ANY, 0, "HOST", cmd_host)
 DEF_CMD (S_ANY, 0, "INCLUDE", cmd_include)
 DEF_CMD (S_ANY, 0, "N OF CASES", cmd_n_of_cases)
-DEF_CMD (S_ANY, 0, "N", cmd_n_of_cases)
+DEF_CMD (S_ANY, F_ABBREV, "N", cmd_n_of_cases)
 DEF_CMD (S_ANY, 0, "NEW FILE", cmd_new_file)
 DEF_CMD (S_ANY, 0, "PERMISSIONS", cmd_permissions)
-DEF_CMD (S_ANY, 0, "Q", cmd_finish)
+DEF_CMD (S_ANY, F_ABBREV, "Q", cmd_finish)
 DEF_CMD (S_ANY, 0, "QUIT", cmd_finish)
 DEF_CMD (S_ANY, 0, "SET", cmd_set)
 DEF_CMD (S_ANY, 0, "SHOW", cmd_show)
@@ -114,7 +114,7 @@
 DEF_CMD (S_DATA, 0, "SAMPLE", cmd_sample)
 DEF_CMD (S_DATA, 0, "SAVE", cmd_save)
 DEF_CMD (S_DATA, 0, "SORT CASES", cmd_sort_cases)
-DEF_CMD (S_DATA, 0, "SORT", cmd_sort_cases)
+DEF_CMD (S_DATA, F_ABBREV, "SORT", cmd_sort_cases)
 DEF_CMD (S_DATA, 0, "T-TEST", cmd_t_test)
 DEF_CMD (S_DATA, 0, "TEMPORARY", cmd_temporary)
 DEF_CMD (S_DATA, 0, "USE", cmd_use)




reply via email to

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