Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

3 changed files:

Changes:

  • src/code/commandline.lisp
    ... ... @@ -72,7 +72,7 @@
    72 72
     
    
    73 73
     ;;;; Processing the command strings.
    
    74 74
     
    
    75
     (defun process-command-strings ()
    
    75
     (defun process-command-strings (init-command-switches-p)
    
    76 76
       (setq *command-line-words* nil)
    
    77 77
       (setq *command-line-switches* nil)
    
    78 78
       (let ((cmd-strings lisp::lisp-command-line-list)
    
    ... ... @@ -103,7 +103,7 @@
    103 103
           (return-from process-command-strings nil))
    
    104 104
         
    
    105 105
         ;; Set command line switches.
    
    106
         ;; 
    
    106
         ;;
    
    107 107
         (loop
    
    108 108
           (unless str
    
    109 109
     	(return (setf *command-line-switches*
    
    ... ... @@ -119,14 +119,16 @@
    119 119
     	(let (word-list)
    
    120 120
     	  (loop
    
    121 121
     	    (unless str
    
    122
     	      (push (make-cmd-switch switch value (nreverse word-list))
    
    123
     		    *command-line-switches*)
    
    122
     	      (when init-command-switches-p
    
    123
     		(push (make-cmd-switch switch value (nreverse word-list))
    
    124
     		      *command-line-switches*))
    
    124 125
     	      (return nil))
    
    125 126
     	    
    
    126 127
     	    (unless (zerop (length (the simple-string str)))
    
    127 128
     	      (when (char= #\- (schar str 0))
    
    128
     		(push (make-cmd-switch switch value (nreverse word-list))
    
    129
     		      *command-line-switches*)
    
    129
     		(when init-command-switches-p
    
    130
     		  (push (make-cmd-switch switch value (nreverse word-list))
    
    131
     			*command-line-switches*))
    
    130 132
     		(when (and (= (length str) 2)
    
    131 133
     			   (char= #\- (schar str 1)))
    
    132 134
     		  ;; Gather up everything after --, and exit.
    
    ... ... @@ -134,7 +136,7 @@
    134 136
     		  (setf str nil))
    
    135 137
     		(return nil))
    
    136 138
     	      (push str word-list))
    
    137
     	    (setq str (pop cmd-strings))))))))
    
    139
     	    (setq str (pop cmd-strings)))))))))
    
    138 140
     
    
    139 141
     (defun get-command-line-switch (sname)
    
    140 142
       "Accepts the name of a switch as a string and returns the value of
    

  • src/code/save.lisp
    ... ... @@ -153,7 +153,8 @@
    153 153
     				 (process-command-line t)
    
    154 154
     		                  #+:executable
    
    155 155
     		                 (executable nil)
    
    156
     				 (batch-mode nil))
    
    156
     				 (batch-mode nil)
    
    157
     				 (quiet nil))
    
    157 158
       "Saves a CMU Common Lisp core image in the file of the specified name.  The
    
    158 159
       following keywords are defined:
    
    159 160
       
    
    ... ... @@ -191,8 +192,10 @@
    191 192
     
    
    192 193
       :process-command-line
    
    193 194
           If true (the default), process command-line switches via the normal
    
    194
       mechanisms, otherwise ignore all switches (except those processed by the
    
    195
       C startup code).
    
    195
       mechanisms, otherwise ignore all switches (except those processed by
    
    196
       the C startup code).  In either case, the command line switches are
    
    197
       saved in *COMMAND-LINE-STRINGS* and
    
    198
       *COMMAND-LINE-APPLICATION-ARGUMENTS*.
    
    196 199
     
    
    197 200
       :executable
    
    198 201
           If nil (the default), save-lisp will save using the traditional
    
    ... ... @@ -203,7 +206,14 @@
    203 206
       :batch-mode
    
    204 207
           If nil (the default), then the presence of the -batch command-line
    
    205 208
       switch will invoke batch-mode processing.  If true, the produced core
    
    206
       will always be in batch-mode, regardless of any command-line switches."
    
    209
       will always be in batch-mode, regardless of any command-line switches.
    
    210
     
    
    211
       :quiet
    
    212
          If non-NIL, loading, compiling, and GC messages are suppressed.
    
    213
          This is equivalent to setting *load-verbose*, *compile-verbose*,
    
    214
          *compile-print*, *compile-progress*, *require-verbose*, and
    
    215
          *gc-verbose* all to NIL.  If NIL (the default), the default
    
    216
          values of these variables are used."
    
    207 217
     
    
    208 218
       (unless (probe-file (directory-namestring core-file-name))
    
    209 219
         (error 'simple-file-error
    
    ... ... @@ -240,8 +250,7 @@
    240 250
     	     (environment-init)
    
    241 251
     	     (dolist (f *after-save-initializations*) (funcall f))
    
    242 252
     	     (intl::setlocale)
    
    243
     	     (when process-command-line
    
    244
     	       (ext::process-command-strings))
    
    253
     	     (ext::process-command-strings process-command-line)
    
    245 254
     	     (setf *editor-lisp-p* nil)
    
    246 255
     	     (macrolet ((find-switch (name)
    
    247 256
     			  `(find ,name *command-line-switches*
    
    ... ... @@ -249,7 +258,8 @@
    249 258
     				 :test #'(lambda (x y)
    
    250 259
     					   (declare (simple-string x y))
    
    251 260
     					   (string-equal x y)))))
    
    252
                    (when (and process-command-line (find-switch "quiet"))
    
    261
                    (when (or quiet
    
    262
     			 (and process-command-line (find-switch "quiet")))
    
    253 263
                      (setq *load-verbose* nil
    
    254 264
                            *compile-verbose* nil
    
    255 265
                            *compile-print* nil
    
    ... ... @@ -285,8 +295,9 @@
    285 295
     		 (ext::invoke-switch-demons *command-line-switches*
    
    286 296
     					    *command-switch-demons*))
    
    287 297
     	       (when (and print-herald
    
    288
     			  (not (and process-command-line
    
    289
     				    (find-switch "quiet"))))
    
    298
     			  (not (or quiet
    
    299
     				   (and process-command-line
    
    300
     					(find-switch "quiet")))))
    
    290 301
     		 ;; Don't print the herald if -quiet is given.
    
    291 302
     		 (print-herald)))))
    
    292 303
     	 (funcall init-function))
    

  • src/i18n/locale/cmucl.pot
    ... ... @@ -6713,8 +6713,10 @@ msgid ""
    6713 6713
     "\n"
    
    6714 6714
     "  :process-command-line\n"
    
    6715 6715
     "      If true (the default), process command-line switches via the normal\n"
    
    6716
     "  mechanisms, otherwise ignore all switches (except those processed by the\n"
    
    6717
     "  C startup code).\n"
    
    6716
     "  mechanisms, otherwise ignore all switches (except those processed by\n"
    
    6717
     "  the C startup code).  In either case, the command line switches are\n"
    
    6718
     "  saved in *COMMAND-LINE-STRINGS* and\n"
    
    6719
     "  *COMMAND-LINE-APPLICATION-ARGUMENTS*.\n"
    
    6718 6720
     "\n"
    
    6719 6721
     "  :executable\n"
    
    6720 6722
     "      If nil (the default), save-lisp will save using the traditional\n"
    
    ... ... @@ -6725,7 +6727,14 @@ msgid ""
    6725 6727
     "  :batch-mode\n"
    
    6726 6728
     "      If nil (the default), then the presence of the -batch command-line\n"
    
    6727 6729
     "  switch will invoke batch-mode processing.  If true, the produced core\n"
    
    6728
     "  will always be in batch-mode, regardless of any command-line switches."
    
    6730
     "  will always be in batch-mode, regardless of any command-line switches.\n"
    
    6731
     "\n"
    
    6732
     "  :quiet\n"
    
    6733
     "     If non-NIL, loading, compiling, and GC messages are suppressed.\n"
    
    6734
     "     This is equivalent to setting *load-verbose*, *compile-verbose*,\n"
    
    6735
     "     *compile-print*, *compile-progress*, *require-verbose*, and\n"
    
    6736
     "     *gc-verbose* all to NIL.  If NIL (the default), the default\n"
    
    6737
     "     values of these variables are used."
    
    6729 6738
     msgstr ""
    
    6730 6739
     
    
    6731 6740
     #: src/code/save.lisp