carbon2-commit: Fix some testsuite failures, #'delete, #'delq, #'remove, #'remq.
13 years, 11 months
Aidan Kehoe
changeset: 5404:b4ef3128160c
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jan 23 13:13:54 2011 +0000
files: lisp/ChangeLog lisp/cl-macs.el lisp/cl-seq.el tests/ChangeLog tests/automated/lisp-tests.el
description:
Fix some testsuite failures, #'delete, #'delq, #'remove, #'remq.
lisp/ChangeLog addition:
2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (delete):
* cl-macs.el (delq):
* cl-macs.el (remove):
* cl-macs.el (remq):
Don't use the compiler macro if these functions were given the
wrong number of arguments, as happens in lisp-tests.el.
* cl-seq.el (remove, remq): Removed.
I added these to subr.el, and forgot to remove them from here.
tests/ChangeLog addition:
2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (test-fun):
#'delete* and friends can now throw a wrong-type-argument if
handed a non-sequence; accept this too when checking for an error
when passing a fixnum as the SEQUENCE argument.
Check #'remove*, #'remove and #'remq too.
diff -r db326b8fe982 -r b4ef3128160c lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jan 23 12:47:02 2011 +0000
+++ b/lisp/ChangeLog Sun Jan 23 13:13:54 2011 +0000
@@ -1,3 +1,14 @@
+2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl-macs.el (delete):
+ * cl-macs.el (delq):
+ * cl-macs.el (remove):
+ * cl-macs.el (remq):
+ Don't use the compiler macro if these functions were given the
+ wrong number of arguments, as happens in lisp-tests.el.
+ * cl-seq.el (remove, remq): Removed.
+ I added these to subr.el, and forgot to remove them from here.
+
2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-setq, byte-compile-set):
diff -r db326b8fe982 -r b4ef3128160c lisp/cl-macs.el
--- a/lisp/cl-macs.el Sun Jan 23 12:47:02 2011 +0000
+++ b/lisp/cl-macs.el Sun Jan 23 13:13:54 2011 +0000
@@ -3344,42 +3344,49 @@
form))
(define-compiler-macro delete (&whole form &rest args)
- (symbol-macrolet
- ((not-constant '#:not-constant))
- (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
- (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
- (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
- (characterp cl-const-expr-val)))
- (cons 'delete* (cdr form))
- `(delete* ,@(cdr form) :test #'equal)))))
+ (if (eql 3 (length form))
+ (symbol-macrolet ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
+ (characterp cl-const-expr-val)))
+ (cons 'delete* (cdr form))
+ `(delete* ,@(cdr form) :test #'equal))))
+ form))
(define-compiler-macro delq (&whole form &rest args)
- (symbol-macrolet
- ((not-constant '#:not-constant))
- (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
- (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
- (not (cl-non-fixnum-number-p cl-const-expr-val)))
- (cons 'delete* (cdr form))
- `(delete* ,@(cdr form) :test #'eq)))))
+ (if (eql 3 (length form))
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (not (cl-non-fixnum-number-p cl-const-expr-val)))
+ (cons 'delete* (cdr form))
+ `(delete* ,@(cdr form) :test #'eq))))
+ form))
(define-compiler-macro remove (&whole form &rest args)
- (symbol-macrolet
- ((not-constant '#:not-constant))
- (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
- (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
- (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
- (characterp cl-const-expr-val)))
- (cons 'remove* (cdr form))
- `(remove* ,@(cdr form) :test #'equal)))))
+ (if (eql 3 (length form))
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
+ (characterp cl-const-expr-val)))
+ (cons 'remove* (cdr form))
+ `(remove* ,@(cdr form) :test #'equal))))
+ form))
(define-compiler-macro remq (&whole form &rest args)
- (symbol-macrolet
- ((not-constant '#:not-constant))
- (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
- (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
- (not (cl-non-fixnum-number-p cl-const-expr-val)))
- (cons 'remove* (cdr form))
- `(remove* ,@(cdr form) :test #'eq)))))
+ (if (eql 3 (length form))
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (not (cl-non-fixnum-number-p cl-const-expr-val)))
+ (cons 'remove* (cdr form))
+ `(remove* ,@(cdr form) :test #'eq))))
+ form))
(macrolet
((define-foo-if-compiler-macros (&rest alist)
diff -r db326b8fe982 -r b4ef3128160c lisp/cl-seq.el
--- a/lisp/cl-seq.el Sun Jan 23 12:47:02 2011 +0000
+++ b/lisp/cl-seq.el Sun Jan 23 13:13:54 2011 +0000
@@ -55,26 +55,6 @@
;; () lists in the docstrings, but that often breaks because of dynamic
;; scope (e.g. a variable called start bound in this file and one in a
;; user-supplied test predicate may well interfere with each other).
-
-;; XEmacs change: these two are in subr.el in GNU Emacs.
-(defun remove (cl-item cl-seq)
- "Remove all occurrences of ITEM in SEQUENCE, testing with `equal'.
-
-This is a non-destructive function; it makes a copy of SEQUENCE if necessary
-to avoid corrupting the original SEQUENCE.
-Also see: `remove*', `delete', `delete*'
-
-arguments: (ITEM SEQUENCE)"
- (remove* cl-item cl-seq :test #'equal))
-
-(defun remq (cl-item cl-seq)
- "Remove all occurrences of ITEM in SEQUENCE, comparing with `eq'.
-
-This is a non-destructive function; it makes a copy of SEQUENCE to avoid
-corrupting the original LIST. See also the more general `remove*'.
-
-arguments: (ITEM SEQUENCE)"
- (remove* cl-item cl-seq :test #'eq))
(defun remove-if (cl-predicate cl-seq &rest cl-keys)
"Remove all items satisfying PREDICATE in SEQUENCE.
diff -r db326b8fe982 -r b4ef3128160c tests/ChangeLog
--- a/tests/ChangeLog Sun Jan 23 12:47:02 2011 +0000
+++ b/tests/ChangeLog Sun Jan 23 13:13:54 2011 +0000
@@ -1,3 +1,11 @@
+2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/lisp-tests.el (test-fun):
+ #'delete* and friends can now throw a wrong-type-argument if
+ handed a non-sequence; accept this too when checking for an error
+ when passing a fixnum as the SEQUENCE argument.
+ Check #'remove*, #'remove and #'remq too.
+
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (list): Test #'concatenate, especially
diff -r db326b8fe982 -r b4ef3128160c tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Sun Jan 23 12:47:02 2011 +0000
+++ b/tests/automated/lisp-tests.el Sun Jan 23 13:13:54 2011 +0000
@@ -793,19 +793,21 @@
`(progn
(Check-Error wrong-number-of-arguments (,fun))
(Check-Error wrong-number-of-arguments (,fun nil))
- (Check-Error malformed-list (,fun nil 1))
+ (Check-Error (malformed-list wrong-type-argument) (,fun nil 1))
,@(loop for n in '(1 2 2000)
collect `(Check-Error circular-list (,fun 1 (make-circular-list ,n))))))
(test-funs (&rest funs) `(progn ,@(loop for fun in funs collect `(test-fun ,fun)))))
- (test-funs member* member old-member
- memq old-memq
- assoc* assoc old-assoc
- rassoc* rassoc old-rassoc
- rassq old-rassq
- delete* delete old-delete
- delq old-delq
- remassoc remassq remrassoc remrassq))
+ (test-funs member* member memq
+ assoc* assoc assq
+ rassoc* rassoc rassq
+ delete* delete delq
+ remove* remove remq
+ old-member old-memq
+ old-assoc old-assq
+ old-rassoc old-rassq
+ old-delete old-delq
+ remassoc remassq remrassoc remrassq))
(let ((x '((1 . 2) 3 (4 . 5))))
(Assert (eq (assoc 1 x) (car x)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Use Ben's recently-introduced listu (), where appropriate.
13 years, 11 months
Aidan Kehoe
changeset: 5403:db326b8fe982
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jan 23 12:47:02 2011 +0000
files: src/ChangeLog src/file-coding.c src/intl-win32.c src/profile.c src/unicode.c
description:
Use Ben's recently-introduced listu (), where appropriate.
2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (complex_vars_of_file_coding):
* intl-win32.c (complex_vars_of_intl_win32):
* profile.c (Fget_profiling_info):
* unicode.c (complex_vars_of_unicode):
Replace various awkward calls to nconc2 () with list6 () with
analogous calls to Ben's relatively-recently introduced listu (),
constructing a list from an arbitrary number of C arguments.
diff -r 2a54dfbe434f -r db326b8fe982 src/ChangeLog
--- a/src/ChangeLog Sat Jan 22 23:29:25 2011 +0000
+++ b/src/ChangeLog Sun Jan 23 12:47:02 2011 +0000
@@ -1,3 +1,13 @@
+2011-01-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * file-coding.c (complex_vars_of_file_coding):
+ * intl-win32.c (complex_vars_of_intl_win32):
+ * profile.c (Fget_profiling_info):
+ * unicode.c (complex_vars_of_unicode):
+ Replace various awkward calls to nconc2 () with list6 () with
+ analogous calls to Ben's relatively-recently introduced listu (),
+ constructing a list from an arbitrary number of C arguments.
+
2011-01-18 Mike Sperber <mike(a)xemacs.org>
* s/freebsd.h: Zap. Not really needed anymore, and it has unclear
diff -r 2a54dfbe434f -r db326b8fe982 src/file-coding.c
--- a/src/file-coding.c Sat Jan 22 23:29:25 2011 +0000
+++ b/src/file-coding.c Sun Jan 23 12:47:02 2011 +0000
@@ -4817,142 +4817,143 @@
Fmake_coding_system_internal
(Qconvert_eol_cr, Qconvert_eol,
build_defer_string ("Convert CR to LF"),
- nconc2 (list6 (Qdocumentation,
- build_defer_string (
+ listu (Qdocumentation,
+ build_defer_string (
"Converts CR (used to mark the end of a line on Macintosh systems) to LF\n"
"(used internally and under Unix to mark the end of a line)."),
- Qmnemonic, build_ascstring ("CR->LF"),
- Qsubtype, Qcr),
- /* VERY IMPORTANT! Tell make-coding-system not to generate
+ Qmnemonic, build_ascstring ("CR->LF"),
+ Qsubtype, Qcr,
+ /* VERY IMPORTANT! Tell make-coding-system not to generate
+ subsidiaries -- it needs the coding systems we're creating
+ to do so! */
+ Qeol_type, Qlf,
+ Qsafe_charsets, Qt,
+ Qunbound));
+ Fmake_coding_system_internal
+ (Qconvert_eol_lf, Qconvert_eol,
+ build_defer_string ("Convert LF to LF (do nothing)"),
+ listu (Qdocumentation,
+ build_defer_string ("Do nothing."),
+ Qmnemonic, build_ascstring ("LF->LF"),
+ Qsubtype, Qlf,
+ /* VERY IMPORTANT! Tell make-coding-system not to generate
subsidiaries -- it needs the coding systems we're creating
to do so! */
- list4 (Qeol_type, Qlf,
- Qsafe_charsets, Qt)));
-
- Fmake_coding_system_internal
- (Qconvert_eol_lf, Qconvert_eol,
- build_defer_string ("Convert LF to LF (do nothing)"),
- nconc2 (list6 (Qdocumentation,
- build_defer_string (
-"Do nothing."),
- Qmnemonic, build_ascstring ("LF->LF"),
- Qsubtype, Qlf),
- /* VERY IMPORTANT! Tell make-coding-system not to generate
- subsidiaries -- it needs the coding systems we're creating
- to do so! */
- list4 (Qeol_type, Qlf,
- Qsafe_charsets, Qt)));
+ Qeol_type, Qlf,
+ Qsafe_charsets, Qt,
+ Qunbound));
Fmake_coding_system_internal
(Qconvert_eol_crlf, Qconvert_eol,
build_defer_string ("Convert CRLF to LF"),
- nconc2 (list6 (Qdocumentation,
- build_defer_string (
+ listu (Qdocumentation,
+ build_defer_string (
"Converts CR+LF (used to mark the end of a line on Macintosh systems) to LF\n"
"(used internally and under Unix to mark the end of a line)."),
- Qmnemonic, build_ascstring ("CRLF->LF"),
- Qsubtype, Qcrlf),
-
- /* VERY IMPORTANT! Tell make-coding-system not to generate
- subsidiaries -- it needs the coding systems we're creating
- to do so! */
- list4 (Qeol_type, Qlf,
- Qsafe_charsets, Qt)));
+ Qmnemonic, build_ascstring ("CRLF->LF"),
+ Qsubtype, Qcrlf,
+ /* VERY IMPORTANT! Tell make-coding-system not to generate
+ subsidiaries -- it needs the coding systems we're creating
+ to do so! */
+ Qeol_type, Qlf,
+ Qsafe_charsets, Qt,
+ Qunbound));
Fmake_coding_system_internal
(Qconvert_eol_autodetect, Qconvert_eol,
build_defer_string ("Autodetect EOL type"),
- nconc2 (list6 (Qdocumentation,
- build_defer_string (
-"Autodetect the end-of-line type."),
- Qmnemonic, build_ascstring ("Auto-EOL"),
- Qsubtype, Qnil),
- /* VERY IMPORTANT! Tell make-coding-system not to generate
- subsidiaries -- it needs the coding systems we're creating
- to do so! */
- list4 (Qeol_type, Qlf,
- Qsafe_charsets, Qt)));
+ listu (Qdocumentation,
+ build_defer_string ("Autodetect the end-of-line type."),
+ Qmnemonic, build_ascstring ("Auto-EOL"),
+ Qsubtype, Qnil,
+ /* VERY IMPORTANT! Tell make-coding-system not to generate
+ subsidiaries -- it needs the coding systems we're creating
+ to do so! */
+ Qeol_type, Qlf,
+ Qsafe_charsets, Qt,
+ Qunbound));
Fmake_coding_system_internal
(Qundecided, Qundecided,
build_defer_string ("Undecided (auto-detect)"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string
- ("Automatically detects the correct encoding."),
- Qmnemonic, build_ascstring ("Auto")),
- list6 (Qdo_eol, Qt, Qdo_coding, Qt,
- /* We do EOL detection ourselves so we don't need to be
- wrapped in an EOL detector. (It doesn't actually hurt,
- though, I don't think.) */
- Qeol_type, Qlf)));
+ listu (Qdocumentation,
+ build_defer_string ("Automatically detects the correct encoding."),
+ Qmnemonic, build_ascstring ("Auto"),
+ Qdo_eol, Qt, Qdo_coding, Qt,
+ /* We do EOL detection ourselves so we don't need to be
+ wrapped in an EOL detector. (It doesn't actually hurt,
+ though, I don't think.) */
+ Qeol_type, Qlf,
+ Qunbound));
Fmake_coding_system_internal
(intern ("undecided-dos"), Qundecided,
build_defer_string ("Undecided (auto-detect) (CRLF)"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string
- ("Automatically detects the correct encoding; EOL type of CRLF forced."),
- Qmnemonic, build_ascstring ("Auto")),
- list4 (Qdo_coding, Qt,
- Qeol_type, Qcrlf)));
+ listu (Qdocumentation,
+ build_defer_string
+ ("Automatically detects the correct encoding; EOL type of CRLF forced."),
+ Qmnemonic, build_ascstring ("Auto"),
+ Qdo_coding, Qt,
+ Qeol_type, Qcrlf,
+ Qunbound));
Fmake_coding_system_internal
(intern ("undecided-unix"), Qundecided,
build_defer_string ("Undecided (auto-detect) (LF)"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string
- ("Automatically detects the correct encoding; EOL type of LF forced."),
- Qmnemonic, build_ascstring ("Auto")),
- list4 (Qdo_coding, Qt,
- Qeol_type, Qlf)));
+ listu (Qdocumentation,
+ build_defer_string
+ ("Automatically detects the correct encoding; EOL type of LF forced."),
+ Qmnemonic, build_ascstring ("Auto"),
+ Qdo_coding, Qt,
+ Qeol_type, Qlf,
+ Qunbound));;
Fmake_coding_system_internal
(intern ("undecided-mac"), Qundecided,
build_defer_string ("Undecided (auto-detect) (CR)"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string
- ("Automatically detects the correct encoding; EOL type of CR forced."),
- Qmnemonic, build_ascstring ("Auto")),
- list4 (Qdo_coding, Qt,
- Qeol_type, Qcr)));
+ listu (Qdocumentation,
+ build_defer_string
+ ("Automatically detects the correct encoding; EOL type of CR forced."),
+ Qmnemonic, build_ascstring ("Auto"),
+ Qdo_coding, Qt,
+ Qeol_type, Qcr,
+ Qunbound));
/* Need to create this here or we're really screwed. */
Fmake_coding_system_internal
(Qraw_text, Qno_conversion,
build_defer_string ("Raw Text"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string ("Raw text converts only line-break "
- "codes, and acts otherwise like "
- "`binary'."),
- Qmnemonic, build_ascstring ("Raw")),
-#ifdef MULE
- list2 (Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1,
- Vcharset_latin_iso8859_1))));
-
-#else
- Qnil));
-#endif
+ listu (Qdocumentation,
+ build_defer_string ("Raw text converts only line-break "
+ "codes, and acts otherwise like "
+ "`binary'."),
+ Qmnemonic, build_ascstring ("Raw"),
+#ifdef MULE
+ Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1,
+ Vcharset_latin_iso8859_1),
+
+#endif
+ Qunbound));
+
Fmake_coding_system_internal
(Qbinary, Qno_conversion,
build_defer_string ("Binary"),
- nconc2 (list6 (Qdocumentation,
- build_defer_string (
+ listu (Qdocumentation,
+ build_defer_string (
"This coding system is as close as it comes to doing no conversion.\n"
"On input, each byte is converted directly into the character\n"
"with the corresponding code -- i.e. from the `ascii', `control-1',\n"
"or `latin-1' character sets. On output, these characters are\n"
"converted back to the corresponding bytes, and other characters\n"
"are converted to the default character, i.e. `~'."),
- Qeol_type, Qlf,
- Qmnemonic, build_ascstring ("Binary")),
-#ifdef MULE
- list2 (Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1,
- Vcharset_latin_iso8859_1))));
-
-#else
- Qnil));
-#endif
+ Qeol_type, Qlf,
+ Qmnemonic, build_ascstring ("Binary"),
+#ifdef MULE
+ Qsafe_charsets, list3 (Vcharset_ascii, Vcharset_control_1,
+ Vcharset_latin_iso8859_1),
+#endif
+ Qunbound));
/* Formerly aliased to raw-text! Completely bogus and not even the same
as FSF Emacs. */
diff -r 2a54dfbe434f -r db326b8fe982 src/intl-win32.c
--- a/src/intl-win32.c Sat Jan 22 23:29:25 2011 +0000
+++ b/src/intl-win32.c Sun Jan 23 12:47:02 2011 +0000
@@ -2358,14 +2358,15 @@
Fmake_coding_system_internal
(Qmswindows_unicode, Qunicode,
build_defer_string ("MS Windows Unicode"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string (
+ listu (Qdocumentation,
+ build_defer_string (
"Converts to the Unicode encoding for Windows API calls.\n"
"This encoding is equivalent to standard UTF16, little-endian."
),
- Qmnemonic, build_ascstring ("MSW-U")),
- list4 (Qunicode_type, Qutf_16,
- Qlittle_endian, Qt)));
+ Qmnemonic, build_ascstring ("MSW-U"),
+ Qunicode_type, Qutf_16,
+ Qlittle_endian, Qt,
+ Qunbound));
#ifdef MULE
/* Just temporarily. This will get fixed in mule-msw-init.el. */
diff -r 2a54dfbe434f -r db326b8fe982 src/profile.c
--- a/src/profile.c Sat Jan 22 23:29:25 2011 +0000
+++ b/src/profile.c Sun Jan 23 12:47:02 2011 +0000
@@ -542,15 +542,16 @@
unbind_to (count);
}
- retv = nconc2 (list6 (Qtiming, closure.timing, Qtotal_timing,
- copy_hash_table_or_blank (Vtotal_timing_profile_table),
- Qcall_count,
- copy_hash_table_or_blank (Vcall_count_profile_table)),
- list4 (Qgc_usage,
- copy_hash_table_or_blank (Vgc_usage_profile_table),
- Qtotal_gc_usage,
- copy_hash_table_or_blank (Vtotal_gc_usage_profile_table
- )));
+ retv = listu (Qtiming, closure.timing,
+ Qtotal_timing,
+ copy_hash_table_or_blank (Vtotal_timing_profile_table),
+ Qcall_count,
+ copy_hash_table_or_blank (Vcall_count_profile_table),
+ Qgc_usage,
+ copy_hash_table_or_blank (Vgc_usage_profile_table),
+ Qtotal_gc_usage,
+ copy_hash_table_or_blank (Vtotal_gc_usage_profile_table),
+ Qunbound);
unbind_to (depth);
return retv;
}
diff -r 2a54dfbe434f -r db326b8fe982 src/unicode.c
--- a/src/unicode.c Sat Jan 22 23:29:25 2011 +0000
+++ b/src/unicode.c Sun Jan 23 12:47:02 2011 +0000
@@ -3294,8 +3294,8 @@
Fmake_coding_system_internal
(Qutf_8, Qunicode,
build_defer_string ("UTF-8"),
- nconc2 (list4 (Qdocumentation,
- build_defer_string (
+ listu (Qdocumentation,
+ build_defer_string (
"UTF-8 Unicode encoding -- ASCII-compatible 8-bit variable-width encoding\n"
"sharing the following principles with the Mule-internal encoding:\n"
"\n"
@@ -3317,6 +3317,7 @@
" -- Given only the leading byte, you know how many following bytes\n"
" are present.\n"
),
- Qmnemonic, build_ascstring ("UTF8")),
- list2 (Qunicode_type, Qutf_8)));
+ Qmnemonic, build_ascstring ("UTF8"),
+ Qunicode_type, Qutf_8,
+ Qunbound));
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Don't quote keywords, they've been self-quoting for well over a decade.
13 years, 11 months
Aidan Kehoe
changeset: 5402:2a54dfbe434f
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jan 22 23:29:25 2011 +0000
files: lisp/ChangeLog lisp/bytecomp.el lisp/cl-compat.el lisp/faces.el lisp/gtk-font-menu.el lisp/msw-font-menu.el lisp/package-get.el lisp/select.el lisp/sound.el lisp/x-font-menu.el
description:
Don't quote keywords, they've been self-quoting for well over a decade.
2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-setq, byte-compile-set):
Remove kludge allowing keywords' values to be set, all the code
that does that is gone.
* cl-compat.el (elt-satisfies-test-p):
* faces.el (set-face-parent):
* faces.el (face-doc-string):
* gtk-font-menu.el:
* gtk-font-menu.el (gtk-reset-device-font-menus):
* msw-font-menu.el:
* msw-font-menu.el (mswindows-reset-device-font-menus):
* package-get.el (package-get-installedp):
* select.el (select-convert-from-image-data):
* sound.el:
* sound.el (load-sound-file):
* x-font-menu.el (x-reset-device-font-menus-core):
Don't quote keywords, they're self-quoting, and the
win from backward-compatibility is sufficiently small now that the
style problem overrides it.
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/ChangeLog Sat Jan 22 23:29:25 2011 +0000
@@ -1,3 +1,25 @@
+2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-setq, byte-compile-set):
+ Remove kludge allowing keywords' values to be set, all the code
+ that does that is gone.
+
+ * cl-compat.el (elt-satisfies-test-p):
+ * faces.el (set-face-parent):
+ * faces.el (face-doc-string):
+ * gtk-font-menu.el:
+ * gtk-font-menu.el (gtk-reset-device-font-menus):
+ * msw-font-menu.el:
+ * msw-font-menu.el (mswindows-reset-device-font-menus):
+ * package-get.el (package-get-installedp):
+ * select.el (select-convert-from-image-data):
+ * sound.el:
+ * sound.el (load-sound-file):
+ * x-font-menu.el (x-reset-device-font-menus-core):
+ Don't quote keywords, they're self-quoting, and the
+ win from backward-compatibility is sufficiently small now that the
+ style problem overrides it.
+
2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (block, return-from): Require that NAME be a symbol
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/bytecomp.el
--- a/lisp/bytecomp.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/bytecomp.el Sat Jan 22 23:29:25 2011 +0000
@@ -3729,13 +3729,10 @@
;; Odd number of args? Let `set' get the error.
(byte-compile-form `(set ',var) for-effect)
(setq val (pop args))
- (if (keywordp var)
- ;; (setq :foo ':foo) compatibility kludge
- (byte-compile-form `(set ',var ,val) (if args t for-effect))
- (byte-compile-form val)
- (unless (or args for-effect)
- (byte-compile-out 'byte-dup 0))
- (byte-compile-variable-ref 'byte-varset var))))))
+ (byte-compile-form val)
+ (unless (or args for-effect)
+ (byte-compile-out 'byte-dup 0))
+ (byte-compile-variable-ref 'byte-varset var)))))
(setq for-effect nil))
(defun byte-compile-set (form)
@@ -3745,11 +3742,10 @@
(let ((symform (nth 1 form))
(valform (nth 2 form))
sym)
- (if (and (= (length form) 3)
- (= (safe-length symform) 2)
+ (if (and (eql (length form) 3)
+ (eql (safe-length symform) 2)
(eq (car symform) 'quote)
- (symbolp (setq sym (car (cdr symform))))
- (not (byte-compile-constant-symbol-p sym)))
+ (symbolp (setq sym (car (cdr symform)))))
(byte-compile-setq `(setq ,sym ,valform))
(byte-compile-two-args form))))
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/cl-compat.el
--- a/lisp/cl-compat.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/cl-compat.el Sat Jan 22 23:29:25 2011 +0000
@@ -75,9 +75,9 @@
(assq key klist))
(defun elt-satisfies-test-p (item elt klist)
- (let ((test-not (cdr (assq ':test-not klist)))
- (test (cdr (assq ':test klist)))
- (key (cdr (assq ':key klist))))
+ (let ((test-not (cdr (assq :test-not klist)))
+ (test (cdr (assq :test klist)))
+ (key (cdr (assq :key klist))))
(if key (setq elt (funcall key elt)))
(if test-not (not (funcall test-not item elt))
(funcall (or test 'eql) item elt))))
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/faces.el
--- a/lisp/faces.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/faces.el Sat Jan 22 23:29:25 2011 +0000
@@ -418,7 +418,7 @@
how-to-add))
(set-difference built-in-face-specifiers
'(display-table background-pixmap inherit)))
- (set-face-background-pixmap face (vector 'inherit ':face parent)
+ (set-face-background-pixmap face (vector 'inherit :face parent)
locale tag-set how-to-add)
nil)
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/gtk-font-menu.el
--- a/lisp/gtk-font-menu.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/gtk-font-menu.el Sat Jan 22 23:29:25 2011 +0000
@@ -168,19 +168,19 @@
(mapcar (lambda (x)
(vector x
(list 'font-menu-set-font x nil nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
families)
(mapcar (lambda (x)
(vector (if (/= 0 (% x 10))
(number-to-string (/ x 10.0))
(number-to-string (/ x 10)))
(list 'font-menu-set-font nil nil x)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
sizes)
(mapcar (lambda (x)
(vector x
(list 'font-menu-set-font nil x nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
weights)))
(cdr dev-cache)))
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/msw-font-menu.el
--- a/lisp/msw-font-menu.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/msw-font-menu.el Sat Jan 22 23:29:25 2011 +0000
@@ -140,17 +140,17 @@
(mapcar (lambda (x)
(vector x
(list 'font-menu-set-font x nil nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
families)
(mapcar (lambda (x)
(vector (int-to-string x)
(list 'font-menu-set-font nil nil x)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
sizes)
(mapcar (lambda (x)
(vector x
(list 'font-menu-set-font nil x nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
weights)))
(cdr dev-cache)))
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/package-get.el
--- a/lisp/package-get.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/package-get.el Sat Jan 22 23:29:25 2011 +0000
@@ -1240,7 +1240,7 @@
;; Use packages-package-list which contains name and version
(equal (plist-get
(package-get-info-find-package packages-package-list
- package) ':version)
+ package) :version)
(if (floatp version)
version
(string-to-number version))))
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/select.el
--- a/lisp/select.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/select.el Sat Jan 22 23:29:25 2011 +0000
@@ -767,7 +767,7 @@
corresponding to that data as an end-glyph extent property of that space. "
(let* ((str (make-string 1 ?\ ))
(extent (make-extent 0 1 str))
- (glyph (make-glyph (vector image-type ':data value))))
+ (glyph (make-glyph (vector image-type :data value))))
(when glyph
(set-extent-property extent 'invisible t)
(set-extent-property extent 'start-open t)
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/sound.el
--- a/lisp/sound.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/sound.el Sat Jan 22 23:29:25 2011 +0000
@@ -181,8 +181,8 @@
(setq sound-alist (cons
(nconc (list sound-name)
(if (and volume (not (eq 0 volume)))
- (list ':volume volume))
- (list ':sound data))
+ (list :volume volume))
+ (list :sound data))
sound-alist)))
sound-name)
diff -r 34ab0e66aaca -r 2a54dfbe434f lisp/x-font-menu.el
--- a/lisp/x-font-menu.el Sat Jan 22 17:21:22 2011 +0000
+++ b/lisp/x-font-menu.el Sat Jan 22 23:29:25 2011 +0000
@@ -253,21 +253,21 @@
(vector
cache
(mapcar (lambda (x)
- (vector x
+ (vector x
(list 'font-menu-set-font x nil nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
families)
(mapcar (lambda (x)
(vector (if (/= 0 (% x 10))
(number-to-string (/ x 10.0))
(number-to-string (/ x 10)))
(list 'font-menu-set-font nil nil x)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
sizes)
(mapcar (lambda (x)
(vector x
(list 'font-menu-set-font nil x nil)
- ':style 'radio ':active nil ':selected nil))
+ :style 'radio :active nil :selected nil))
weights)))
(cdr dev-cache)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Require that NAME be an unquoted symbol, #'block, #'return-from
13 years, 11 months
Aidan Kehoe
changeset: 5400:174aed57a32a
parent: 5398:9dd4559b9e9a
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jan 22 17:20:19 2011 +0000
files: lisp/ChangeLog lisp/cl-macs.el lisp/descr-text.el
description:
Require that NAME be an unquoted symbol, #'block, #'return-from
2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (block, return-from): Require that NAME be a symbol
in these macros, as always documented in the #'block docstring and
as required by Common Lisp.
* descr-text.el (unidata-initialize-unihan-database):
Correct the use of non-symbols in #'block and #'return-from in
this function.
diff -r 9dd4559b9e9a -r 174aed57a32a lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jan 15 17:24:06 2011 +0000
+++ b/lisp/ChangeLog Sat Jan 22 17:20:19 2011 +0000
@@ -1,3 +1,12 @@
+2011-01-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl-macs.el (block, return-from): Require that NAME be a symbol
+ in these macros, as always documented in the #'block docstring and
+ as required by Common Lisp.
+ * descr-text.el (unidata-initialize-unihan-database):
+ Correct the use of non-symbols in #'block and #'return-from in
+ this function.
+
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-extra.el (concatenate): Accept more complicated TYPEs in this
diff -r 9dd4559b9e9a -r 174aed57a32a lisp/cl-macs.el
--- a/lisp/cl-macs.el Sat Jan 15 17:24:06 2011 +0000
+++ b/lisp/cl-macs.el Sat Jan 22 17:20:19 2011 +0000
@@ -745,7 +745,8 @@
called from BODY."
(if (cl-safe-expr-p (cons 'progn body)) (cons 'progn body)
(list 'cl-block-wrapper
- (list* 'catch (list 'quote (intern (format "--cl-block-%s--" name)))
+ (list* 'catch (list 'quote (intern (concat "--cl-block-"
+ (symbol-name name) "--")))
body))))
(defvar cl-active-block-names nil)
@@ -788,7 +789,7 @@
returning RESULT from that form (or nil if RESULT is omitted).
This is compatible with Common Lisp, but note that `defun' and
`defmacro' do not create implicit blocks as they do in Common Lisp."
- (let ((name2 (intern (format "--cl-block-%s--" name))))
+ (let ((name2 (intern (concat "--cl-block-" (symbol-name name) "--"))))
(list 'cl-block-throw (list 'quote name2) result)))
diff -r 9dd4559b9e9a -r 174aed57a32a lisp/descr-text.el
--- a/lisp/descr-text.el Sat Jan 15 17:24:06 2011 +0000
+++ b/lisp/descr-text.el Sat Jan 22 17:20:19 2011 +0000
@@ -598,7 +598,7 @@
(concat message
(make-string
(mod loop-count 44) ?.)))
- (block 'dealing-with-chars
+ (block dealing-with-chars
(when (= buffer-size (- (point-max) (point-min)))
;; If we're in the body of the file, we need to delete the
;; character info for the last character, and set offset-end
@@ -637,13 +637,13 @@
(while t
(when (= (point) (point-max))
;; We're at the end of this part of the file.
- (return-from 'dealing-with-chars))
+ (return-from dealing-with-chars))
(unless (re-search-forward "^\\(U\\+[0-9A-F]\\{4,6\\}\\)\t"
nil t)
;; We're probably in the comments at the start of the
;; file. No need to look for character info.
- (return-from 'dealing-with-chars))
+ (return-from dealing-with-chars))
;; Store where the character started.
(beginning-of-line)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Zap freebsd.h.
13 years, 11 months
Michael Sperber
changeset: 5399:fde0802ee3e0
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Tue Jan 18 10:01:29 2011 +0100
files: lib-src/ChangeLog lib-src/fakemail.c src/ChangeLog src/s/freebsd.h
description:
Zap freebsd.h.
2011-01-18 Mike Sperber <mike(a)xemacs.org>
* s/freebsd.h: Zap. Not really needed anymore, and it has unclear
license status.
2011-01-15 Mike Sperber <mike(a)xemacs.org>
* fakemail.c: #include <osreldate.h> on FreeBSD, since we no
longer have freebsd.h.
diff -r 9dd4559b9e9a -r fde0802ee3e0 lib-src/ChangeLog
--- a/lib-src/ChangeLog Sat Jan 15 17:24:06 2011 +0000
+++ b/lib-src/ChangeLog Tue Jan 18 10:01:29 2011 +0100
@@ -1,3 +1,8 @@
+2011-01-15 Mike Sperber <mike(a)xemacs.org>
+
+ * fakemail.c: #include <osreldate.h> on FreeBSD, since we no
+ longer have freebsd.h.
+
2010-06-14 Stephen J. Turnbull <stephen(a)xemacs.org>
* gnuserv.c:
diff -r 9dd4559b9e9a -r fde0802ee3e0 lib-src/fakemail.c
--- a/lib-src/fakemail.c Sat Jan 15 17:24:06 2011 +0000
+++ b/lib-src/fakemail.c Tue Jan 18 10:01:29 2011 +0100
@@ -144,6 +144,10 @@
extern FILE *popen ();
extern int fclose (), pclose ();
extern char *malloc (), *realloc ();
+#endif
+
+#if defined(__FreeBSD__)
+#include <osreldate.h>
#endif
#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000
diff -r 9dd4559b9e9a -r fde0802ee3e0 src/ChangeLog
--- a/src/ChangeLog Sat Jan 15 17:24:06 2011 +0000
+++ b/src/ChangeLog Tue Jan 18 10:01:29 2011 +0100
@@ -1,3 +1,8 @@
+2011-01-18 Mike Sperber <mike(a)xemacs.org>
+
+ * s/freebsd.h: Zap. Not really needed anymore, and it has unclear
+ license status.
+
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* s/usg5-4.h (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF):
diff -r 9dd4559b9e9a -r fde0802ee3e0 src/s/freebsd.h
--- a/src/s/freebsd.h Sat Jan 15 17:24:06 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/* Synched up with: FSF 19.31. */
-
-/* s/ file for freebsd system. */
-
-/* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up.
- Earlier versions do not have shared libraries, so inhibit them.
- You can inhibit them on newer systems if you wish
- by defining NO_SHARED_LIBS. */
-#ifndef __FreeBSD__
-#define NO_SHARED_LIBS
-#endif
-
-/* Get most of the stuff from bsd4.3 */
-#include "bsd4-3.h"
-
-/* For mem-limits.h. */
-#define BSD4_2
-
-/* These aren't needed, since we have getloadavg. */
-#undef KERNEL_FILE
-#undef LDAV_SYMBOL
-
-#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
-
-#define INTERRUPTIBLE_OPEN
-
-#define LIBS_DEBUG
-/* FreeBSD 2.2 or later */
-#ifndef __FreeBSD_version
-#include <osreldate.h>
-#endif
-#if __FreeBSD_version >= 199701 && __FreeBSD_version < 600006
-#define LIBS_SYSTEM "-lutil -lxpg4"
-#else
-#define LIBS_SYSTEM "-lutil"
-#endif
-
-#ifndef NOT_C_CODE
-#ifdef BSD /* fixing BSD define */
-#undef BSD
-#endif
-#include <sys/param.h>
-/* Kludge to work around setlocale(LC_ALL,...) not working after 01/1997 */
-#if __FreeBSD_version >= 199701 && __FreeBSD_version < 226000
-#ifdef HAVE_X_WINDOWS
-#include <X11/Xlocale.h>
-#define setlocale(locale_category, locale_spec) setlocale(LC_CTYPE, locale_spec)
-#endif /* HAVE X */
-#endif /* FreeBSD >= 199701 && < 226000 */
-#endif /* C code */
-
-#define LIBS_TERMCAP "-ltermcap"
-
-#ifdef __ELF__ /* since from 3.0-CURRENT(maybe 19980831 or later) */
-#ifndef NOT_C_CODE
-#include <stddef.h>
-#endif
-#define LD_SWITCH_SYSTEM
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o
-#define UNEXEC "unexelf.o"
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
-#define LINKER "$(CC) -nostdlib"
-#undef LIB_GCC
-#define LIB_GCC
-
-#else /* not __ELF__ */
-
-#ifndef NO_SHARED_LIBS
-#if 0 /* mrb */
-#define LIB_GCC "-lgcc"
-#define LD_SWITCH_SYSTEM "-dc -dp -e start"
-#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
-#else /* mrb */
-#define ORDINARY_LINK
-#undef LIB_GCC
-#undef LD_SWITCH_SYSTEM
-#undef START_FILES
-#endif /* mrb */
-
-#define HAVE_TEXT_START /* No need to define `start_of_text'. */
-#define UNEXEC "unexfreebsd.o"
-#define RUN_TIME_REMAP
-
-#ifndef N_TRELOFF
-#define N_PAGSIZ(x) __LDPGSZ
-#define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data))
-#define N_TRELOFF(x) N_RELOFF(x)
-#endif
-#else /* NO_SHARED_LIBS */
-#ifdef __FreeBSD__ /* shared libs are available, but the user prefers
- not to use them. */
-#define LD_SWITCH_SYSTEM "-Bstatic"
-#define A_TEXT_OFFSET(x) (sizeof (struct exec))
-#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
-#endif /* __FreeBSD__ */
-#endif /* NO_SHARED_LIBS */
-
-#endif /* not __ELF__ */
-
-/* #define NO_TERMIO */ /* detected in configure */
-#define DECLARE_GETPWUID_WITH_UID_T
-
-/* freebsd uses OXTABS instead of the expected TAB3. */
-#define TABDLY OXTABS
-#define TAB3 OXTABS
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Try again, s/usg5-4.h, this type with qxestrcpy_ascii(), etc.
13 years, 11 months
Aidan Kehoe
changeset: 5398:9dd4559b9e9a
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jan 15 17:24:06 2011 +0000
files: src/ChangeLog src/s/usg5-4.h
description:
Try again, s/usg5-4.h, this type with qxestrcpy_ascii(), etc.
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* s/usg5-4.h (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF):
That didn't work; attempt with qxestrcpy_ascii(),
qxestrncpy_ascii().
diff -r ba62563ec7c7 -r 9dd4559b9e9a src/ChangeLog
--- a/src/ChangeLog Sat Jan 15 15:45:46 2011 +0000
+++ b/src/ChangeLog Sat Jan 15 17:24:06 2011 +0000
@@ -1,3 +1,9 @@
+2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * s/usg5-4.h (PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF):
+ That didn't work; attempt with qxestrcpy_ascii(),
+ qxestrncpy_ascii().
+
2011-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* s/hpux11.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF):
diff -r ba62563ec7c7 -r 9dd4559b9e9a src/s/usg5-4.h
--- a/src/s/usg5-4.h Sat Jan 15 15:45:46 2011 +0000
+++ b/src/s/usg5-4.h Sat Jan 15 17:24:06 2011 +0000
@@ -124,7 +124,7 @@
/* This sets the name of the master side of the PTY. */
-#define PTY_NAME_SPRINTF qxestrcpy (pty_name, "/dev/ptmx");
+#define PTY_NAME_SPRINTF qxestrcpy_ascii (pty_name, "/dev/ptmx");
/* This sets the name of the slave side of the PTY. On SysVr4,
grantpt(3) forks a subprocess, so keep sigchld_handler() from
@@ -150,7 +150,8 @@
{ close (fd); return -1; } \
if (!(ptyname = ptsname (fd))) \
{ close (fd); return -1; } \
- qxestrncpy (pty_name, ptyname, sizeof (pty_name)); \
+ qxestrncpy_ascii (pty_name, ptyname, \
+ sizeof (pty_name)); \
pty_name[sizeof (pty_name) - 1] = 0; \
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Accept more complex TYPEs in #'concatenate, cl-extra.el
13 years, 11 months
Aidan Kehoe
changeset: 5397:ba62563ec7c7
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jan 15 15:45:46 2011 +0000
files: lisp/ChangeLog lisp/cl-extra.el lisp/cl-macs.el tests/ChangeLog tests/automated/lisp-tests.el
description:
Accept more complex TYPEs in #'concatenate, cl-extra.el
lisp/ChangeLog addition:
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-extra.el (concatenate): Accept more complicated TYPEs in this
function, handing the sequences over to #'coerce if we don't
understand them here.
* cl-macs.el (inline): Don't proclaim #'concatenate as inline, its
compiler macro is more useful than doing that.
tests/ChangeLog addition:
2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (list): Test #'concatenate, especially
with more complicated TYPEs, which were previously not accepted by
the function.
diff -r 8608eadee6ba -r ba62563ec7c7 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Jan 14 23:35:29 2011 +0000
+++ b/lisp/ChangeLog Sat Jan 15 15:45:46 2011 +0000
@@ -1,3 +1,11 @@
+2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl-extra.el (concatenate): Accept more complicated TYPEs in this
+ function, handing the sequences over to #'coerce if we don't
+ understand them here.
+ * cl-macs.el (inline): Don't proclaim #'concatenate as inline, its
+ compiler macro is more useful than doing that.
+
2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (delete, delq, remove, remq): Move #'remove, #'remq
diff -r 8608eadee6ba -r ba62563ec7c7 lisp/cl-extra.el
--- a/lisp/cl-extra.el Fri Jan 14 23:35:29 2011 +0000
+++ b/lisp/cl-extra.el Sat Jan 15 15:45:46 2011 +0000
@@ -421,9 +421,9 @@
(case type
(vector (apply 'vconcat seqs))
(string (apply 'concat seqs))
- (list (apply 'append (append seqs '(nil))))
+ (list (reduce 'append seqs :from-end t :initial-value nil))
(bit-vector (apply 'bvconcat seqs))
- (t (error 'invalid-argument "Not a sequence type name" type))))
+ (t (coerce (reduce 'append seqs :from-end t :initial-value nil) type))))
;;; List functions.
diff -r 8608eadee6ba -r ba62563ec7c7 lisp/cl-macs.el
--- a/lisp/cl-macs.el Fri Jan 14 23:35:29 2011 +0000
+++ b/lisp/cl-macs.el Sat Jan 15 15:45:46 2011 +0000
@@ -3831,10 +3831,9 @@
(cdadar cdr cadar) (cdaddr cdr caddr) (cddaar cdr cdaar)
(cddadr cdr cdadr) (cdddar cdr cddar) (cddddr cdr cdddr)))
-;;; Things that are inline.
-(proclaim '(inline acons map concatenate
-;; XEmacs omission: gethash is builtin
- cl-set-elt revappend nreconc))
+;;; Things that are inline. XEmacs; the functions that used to be here have
+;;; compiler macros or are built-in.
+(proclaim '(inline cl-set-elt))
;;; Things that are side-effect-free. Moved to byte-optimize.el
;(mapcar (function (lambda (x) (put x 'side-effect-free t)))
diff -r 8608eadee6ba -r ba62563ec7c7 tests/ChangeLog
--- a/tests/ChangeLog Fri Jan 14 23:35:29 2011 +0000
+++ b/tests/ChangeLog Sat Jan 15 15:45:46 2011 +0000
@@ -1,3 +1,9 @@
+2011-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/lisp-tests.el (list): Test #'concatenate, especially
+ with more complicated TYPEs, which were previously not accepted by
+ the function.
+
2011-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (list): Test #'find, especially the
diff -r 8608eadee6ba -r ba62563ec7c7 tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Fri Jan 14 23:35:29 2011 +0000
+++ b/tests/automated/lisp-tests.el Sat Jan 15 15:45:46 2011 +0000
@@ -2814,6 +2814,20 @@
(Assert (eq gensym (find 'not-in-it string :default gensym)))
(Assert (eq 'hi-there (find 'hi-there list)))
;; Different uninterned symbols with the same name.
- (Assert (not (eq '#1=#:everyone (find '#1# list)))))
+ (Assert (not (eq '#1=#:everyone (find '#1# list))))
+
+ ;; Test concatenate.
+ (Assert (equal list (concatenate 'list vector)))
+ (Assert (equal list (concatenate 'list (subseq vector 0 4)
+ (subseq list 4))))
+ (Assert (equal vector (concatenate 'vector list)))
+ (Assert (equal vector (concatenate `(vector * ,(length vector)) list)))
+ (Assert (equal string (concatenate `(vector character ,(length string))
+ (append string nil))))
+ (Assert (equal bit-vector (concatenate 'bit-vector (subseq bit-vector 0 4)
+ (append (subseq bit-vector 4) nil))))
+ (Assert (equal bit-vector (concatenate `(vector bit ,(length bit-vector))
+ (subseq bit-vector 0 4)
+ (append (subseq bit-vector 4) nil)))))
;;; end of lisp-tests.el
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Move #'delq, #'delete to Lisp, adding support for sequences.
13 years, 11 months
Aidan Kehoe
changeset: 5396:8608eadee6ba
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Jan 14 23:35:29 2011 +0000
files: lisp/ChangeLog lisp/cl-macs.el lisp/subr.el lisp/update-elc.el src/ChangeLog src/device-msw.c src/fns.c src/lisp.h src/select.c src/symbols.c
description:
Move #'delq, #'delete to Lisp, adding support for sequences.
src/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
* device-msw.c (Fmswindows_printer_list): Remove a Fdelete ()
call here, remove the necessity for it.
* fns.c (Fdelete, Fdelq):
* lisp.h:
Move #'delete, #'delq to Lisp, implemented in terms of #'delete*
* select.c (Fown_selection_internal):
* select.c (handle_selection_clear):
Use delq_no_quit() in these functions, don't reimplement it or use
Fdelq(), which is now gone.
lisp/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (delete, delq, remove, remq): Move #'remove, #'remq
here, they don't belong in cl-seq.el; move #'delete, #'delq here
from fns.c, implement them in terms of #'delete*, allowing support
for sequences generally.
* update-elc.el (do-autoload-commands): Use #'delete*, not #'delq
here, now the latter's no longer dumped.
* cl-macs.el (delete, delq): Add compiler macros transforming
#'delete and #'delq to #'delete* calls.
diff -r 906ccc7dcd70 -r 8608eadee6ba lisp/ChangeLog
--- a/lisp/ChangeLog Fri Jan 14 23:23:30 2011 +0000
+++ b/lisp/ChangeLog Fri Jan 14 23:35:29 2011 +0000
@@ -1,3 +1,14 @@
+2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (delete, delq, remove, remq): Move #'remove, #'remq
+ here, they don't belong in cl-seq.el; move #'delete, #'delq here
+ from fns.c, implement them in terms of #'delete*, allowing support
+ for sequences generally.
+ * update-elc.el (do-autoload-commands): Use #'delete*, not #'delq
+ here, now the latter's no longer dumped.
+ * cl-macs.el (delete, delq): Add compiler macros transforming
+ #'delete and #'delq to #'delete* calls.
+
2011-01-10 Aidan Kehoe <kehoea(a)parhasard.net>
* dialog.el (make-dialog-box): Correct a misplaced parenthesis
diff -r 906ccc7dcd70 -r 8608eadee6ba lisp/cl-macs.el
--- a/lisp/cl-macs.el Fri Jan 14 23:23:30 2011 +0000
+++ b/lisp/cl-macs.el Fri Jan 14 23:35:29 2011 +0000
@@ -3342,12 +3342,44 @@
(list 'if (list* 'member* a list keys) list (list 'cons a list))
form))
-(define-compiler-macro remove (item sequence)
- `(remove* ,item ,sequence :test #'equal))
+(define-compiler-macro delete (&whole form &rest args)
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
+ (characterp cl-const-expr-val)))
+ (cons 'delete* (cdr form))
+ `(delete* ,@(cdr form) :test #'equal)))))
-(define-compiler-macro remq (item sequence)
- `(remove* ,item ,sequence :test #'eq))
+(define-compiler-macro delq (&whole form &rest args)
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (not (cl-non-fixnum-number-p cl-const-expr-val)))
+ (cons 'delete* (cdr form))
+ `(delete* ,@(cdr form) :test #'eq)))))
+(define-compiler-macro remove (&whole form &rest args)
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (or (symbolp cl-const-expr-val) (fixnump cl-const-expr-val)
+ (characterp cl-const-expr-val)))
+ (cons 'remove* (cdr form))
+ `(remove* ,@(cdr form) :test #'equal)))))
+
+(define-compiler-macro remq (&whole form &rest args)
+ (symbol-macrolet
+ ((not-constant '#:not-constant))
+ (let ((cl-const-expr-val (cl-const-expr-val (nth 1 form) not-constant)))
+ (if (and (cdr form) (not (eq not-constant cl-const-expr-val))
+ (not (cl-non-fixnum-number-p cl-const-expr-val)))
+ (cons 'remove* (cdr form))
+ `(remove* ,@(cdr form) :test #'eq)))))
+
(macrolet
((define-foo-if-compiler-macros (&rest alist)
"Avoid the funcall, variable binding and keyword parsing overhead
diff -r 906ccc7dcd70 -r 8608eadee6ba lisp/subr.el
--- a/lisp/subr.el Fri Jan 14 23:23:30 2011 +0000
+++ b/lisp/subr.el Fri Jan 14 23:35:29 2011 +0000
@@ -148,6 +148,40 @@
(define-function ,@args)))
+(defun delete (item sequence)
+ "Delete by side effect any occurrences of ITEM as a member of SEQUENCE.
+
+The modified SEQUENCE is returned. Comparison is done with `equal'.
+
+If the first member of a list SEQUENCE is ITEM, there is no way to remove it
+by side effect; therefore, write `(setq foo (delete element foo))' to be
+sure of changing the value of `foo'. Also see: `remove'."
+ (delete* item sequence :test #'equal))
+
+(defun delq (item sequence)
+ "Delete by side effect any occurrences of ITEM as a member of SEQUENCE.
+
+The modified SEQUENCE is returned. Comparison is done with `eq'. If
+SEQUENCE is a list and its first member is ITEM, there is no way to remove
+it by side effect; therefore, write `(setq foo (delq element foo))' to be
+sure of changing the value of `foo'."
+ (delete* item sequence :test #'eq))
+
+(defun remove (item sequence)
+ "Remove all occurrences of ITEM in SEQUENCE, testing with `equal'.
+
+This is a non-destructive function; it makes a copy of SEQUENCE if necessary
+to avoid corrupting the original SEQUENCE.
+Also see: `remove*', `delete', `delete*'"
+ (remove* item sequence :test #'equal))
+
+(defun remq (item sequence)
+ "Remove all occurrences of ITEM in SEQUENCE, comparing with `eq'.
+
+This is a non-destructive function; it makes a copy of SEQUENCE to avoid
+corrupting the original SEQUENCE. See also the more general `remove*'."
+ (remove* item sequence :test #'eq))
+
(defun assoc-default (key alist &optional test default)
"Find object KEY in a pseudo-alist ALIST.
ALIST is a list of conses or objects. Each element (or the element's car,
diff -r 906ccc7dcd70 -r 8608eadee6ba lisp/update-elc.el
--- a/lisp/update-elc.el Fri Jan 14 23:23:30 2011 +0000
+++ b/lisp/update-elc.el Fri Jan 14 23:35:29 2011 +0000
@@ -383,7 +383,10 @@
(mapc
#'(lambda (arg)
(setq update-elc-files-to-compile
- (delete arg update-elc-files-to-compile)))
+ (delete* arg update-elc-files-to-compile
+ :test (if default-file-system-ignore-case
+ #'equalp
+ #'equal))))
(append bc-bootstrap bootstrap-other))
(setq command-line-args
(append
diff -r 906ccc7dcd70 -r 8608eadee6ba src/ChangeLog
--- a/src/ChangeLog Fri Jan 14 23:23:30 2011 +0000
+++ b/src/ChangeLog Fri Jan 14 23:35:29 2011 +0000
@@ -9,6 +9,18 @@
* fns.c (Ffind): Use the correct subr information here, pass in
the DEFAULT keyword argument value correctly.
+
+2011-01-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * device-msw.c (Fmswindows_printer_list): Remove a Fdelete ()
+ call here, remove the necessity for it.
+ * fns.c (Fdelete, Fdelq):
+ * lisp.h:
+ Move #'delete, #'delq to Lisp, implemented in terms of #'delete*
+ * select.c (Fown_selection_internal):
+ * select.c (handle_selection_clear):
+ Use delq_no_quit() in these functions, don't reimplement it or use
+ Fdelq(), which is now gone.
2011-01-10 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r 906ccc7dcd70 -r 8608eadee6ba src/device-msw.c
--- a/src/device-msw.c Fri Jan 14 23:23:30 2011 +0000
+++ b/src/device-msw.c Fri Jan 14 23:35:29 2011 +0000
@@ -1329,9 +1329,12 @@
GCPRO2 (result, def_printer);
+ def_printer = msprinter_default_printer ();
+
while (num_printers--)
{
Extbyte *printer_name;
+ Lisp_Object printer_name_lisp;
if (have_nt)
{
PRINTER_INFO_4 *info = (PRINTER_INFO_4 *) data_buf;
@@ -1343,12 +1346,15 @@
printer_name = (Extbyte *) info->pPrinterName;
}
data_buf += enum_entry_size;
-
- result = Fcons (build_tstr_string (printer_name), result);
+
+ printer_name_lisp = build_tstr_string (printer_name);
+ if (0 != qxestrcasecmp (XSTRING_DATA (def_printer),
+ XSTRING_DATA (printer_name_lisp)))
+ {
+ result = Fcons (printer_name_lisp, result);
+ }
}
- def_printer = msprinter_default_printer ();
- result = Fdelete (def_printer, result);
result = Fcons (def_printer, result);
RETURN_UNGCPRO (result);
diff -r 906ccc7dcd70 -r 8608eadee6ba src/fns.c
--- a/src/fns.c Fri Jan 14 23:23:30 2011 +0000
+++ b/src/fns.c Fri Jan 14 23:35:29 2011 +0000
@@ -3137,21 +3137,6 @@
return object;
}
-DEFUN ("delete", Fdelete, 2, 2, 0, /*
-Delete by side effect any occurrences of ELT as a member of LIST.
-The modified LIST is returned. Comparison is done with `equal'.
-If the first member of LIST is ELT, there is no way to remove it by side
-effect; therefore, write `(setq foo (delete element foo))' to be sure
-of changing the value of `foo'.
-Also see: `remove'.
-*/
- (elt, list))
-{
- EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
- (internal_equal (elt, list_elt, 0)));
- return list;
-}
-
DEFUN ("old-delete", Fold_delete, 2, 2, 0, /*
Delete by side effect any occurrences of ELT as a member of LIST.
The modified LIST is returned. Comparison is done with `old-equal'.
@@ -3163,20 +3148,6 @@
{
EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
(internal_old_equal (elt, list_elt, 0)));
- return list;
-}
-
-DEFUN ("delq", Fdelq, 2, 2, 0, /*
-Delete by side effect any occurrences of ELT as a member of LIST.
-The modified LIST is returned. Comparison is done with `eq'.
-If the first member of LIST is ELT, there is no way to remove it by side
-effect; therefore, write `(setq foo (delq element foo))' to be sure of
-changing the value of `foo'.
-*/
- (elt, list))
-{
- EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list,
- (EQ_WITH_EBOLA_NOTICE (elt, list_elt)));
return list;
}
@@ -11790,9 +11761,7 @@
DEFSUBR (Fposition);
DEFSUBR (Ffind);
- DEFSUBR (Fdelete);
DEFSUBR (Fold_delete);
- DEFSUBR (Fdelq);
DEFSUBR (Fold_delq);
DEFSUBR (FdeleteX);
DEFSUBR (FremoveX);
diff -r 906ccc7dcd70 -r 8608eadee6ba src/lisp.h
--- a/src/lisp.h Fri Jan 14 23:23:30 2011 +0000
+++ b/src/lisp.h Fri Jan 14 23:35:29 2011 +0000
@@ -5209,8 +5209,6 @@
EXFUN (Fcopy_list, 1);
EXFUN (Fcopy_sequence, 1);
EXFUN (Fcopy_tree, 2);
-EXFUN (Fdelete, 2);
-EXFUN (Fdelq, 2);
EXFUN (Fdestructive_alist_to_plist, 1);
EXFUN (Felt, 2);
MODULE_API EXFUN (Fequal, 2);
diff -r 906ccc7dcd70 -r 8608eadee6ba src/select.c
--- a/src/select.c Fri Jan 14 23:23:30 2011 +0000
+++ b/src/select.c Fri Jan 14 23:35:29 2011 +0000
@@ -183,19 +183,8 @@
if (!NILP (local_selection_data))
{
owned_p = 1;
- /* Don't use Fdelq() as that may QUIT;. */
- if (EQ (local_selection_data, Fcar (Vselection_alist)))
- Vselection_alist = Fcdr (Vselection_alist);
- else
- {
- Lisp_Object rest;
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
- if (EQ (local_selection_data, Fcar (XCDR (rest))))
- {
- XCDR (rest) = Fcdr (XCDR (rest));
- break;
- }
- }
+ Vselection_alist
+ = delq_no_quit (local_selection_data, Vselection_alist);
}
}
else
@@ -412,21 +401,8 @@
/* Well, we already believe that we don't own it, so that's just fine. */
if (NILP (local_selection_data)) return;
- /* Otherwise, we're really honest and truly being told to drop it.
- Don't use Fdelq() as that may QUIT;.
- */
- if (EQ (local_selection_data, Fcar (Vselection_alist)))
- Vselection_alist = Fcdr (Vselection_alist);
- else
- {
- Lisp_Object rest;
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
- if (EQ (local_selection_data, Fcar (XCDR (rest))))
- {
- XCDR (rest) = Fcdr (XCDR (rest));
- break;
- }
- }
+ /* Otherwise, we're really honest and truly being told to drop it. */
+ Vselection_alist = delq_no_quit (local_selection_data, Vselection_alist);
/* Let random lisp code notice that the selection has been stolen.
*/
diff -r 906ccc7dcd70 -r 8608eadee6ba src/symbols.c
--- a/src/symbols.c Fri Jan 14 23:23:30 2011 +0000
+++ b/src/symbols.c Fri Jan 14 23:35:29 2011 +0000
@@ -2546,7 +2546,8 @@
= buffer_local_alist_element (current_buffer, variable, bfwd);
if (!NILP (alist_element))
- current_buffer->local_var_alist = Fdelq (alist_element, alist);
+ current_buffer->local_var_alist = delq_no_quit (alist_element,
+ alist);
/* Make sure symbol does not think it is set up for this buffer;
force it to look once again for this buffer's value */
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
carbon2-commit: Change to qxesprintf(), qxestrcpy(), s/hpux11.h, s/usg5-4.h
13 years, 11 months
Aidan Kehoe
changeset: 5395:906ccc7dcd70
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Jan 14 23:23:30 2011 +0000
files: src/ChangeLog src/s/hpux11.h src/s/usg5-4.h
description:
Change to qxesprintf(), qxestrcpy(), s/hpux11.h, s/usg5-4.h
2011-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* s/hpux11.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF):
* s/usg5-4.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF):
Replace sprintf() with qxesprintf(), strcpy with qxestrpy(),
hopefully fixing some platform-specific C++ builds.
diff -r 287499ff4c5f -r 906ccc7dcd70 src/ChangeLog
--- a/src/ChangeLog Fri Jan 14 23:16:25 2011 +0000
+++ b/src/ChangeLog Fri Jan 14 23:23:30 2011 +0000
@@ -1,3 +1,10 @@
+2011-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * s/hpux11.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF):
+ * s/usg5-4.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF):
+ Replace sprintf() with qxesprintf(), strcpy with qxestrpy(),
+ hopefully fixing some platform-specific C++ builds.
+
2011-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* fns.c (Ffind): Use the correct subr information here, pass in
diff -r 287499ff4c5f -r 906ccc7dcd70 src/s/hpux11.h
--- a/src/s/hpux11.h Fri Jan 14 23:16:25 2011 +0000
+++ b/src/s/hpux11.h Fri Jan 14 23:23:30 2011 +0000
@@ -104,11 +104,11 @@
/* This is how to get the device name of the tty end of a pty. */
#define PTY_TTY_NAME_SPRINTF \
- sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
+ qxesprintf (pty_name, "/dev/pty/tty%c%x", c, i);
/* This is how to get the device name of the control end of a pty. */
#define PTY_NAME_SPRINTF \
- sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);
+ qxesprintf (pty_name, "/dev/ptym/pty%c%x", c, i);
#ifdef HPUX_USE_SHLIBS
#define LD_SWITCH_SYSTEM
diff -r 287499ff4c5f -r 906ccc7dcd70 src/s/usg5-4.h
--- a/src/s/usg5-4.h Fri Jan 14 23:16:25 2011 +0000
+++ b/src/s/usg5-4.h Fri Jan 14 23:23:30 2011 +0000
@@ -124,7 +124,7 @@
/* This sets the name of the master side of the PTY. */
-#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
+#define PTY_NAME_SPRINTF qxestrcpy (pty_name, "/dev/ptmx");
/* This sets the name of the slave side of the PTY. On SysVr4,
grantpt(3) forks a subprocess, so keep sigchld_handler() from
@@ -150,7 +150,7 @@
{ close (fd); return -1; } \
if (!(ptyname = ptsname (fd))) \
{ close (fd); return -1; } \
- strncpy (pty_name, ptyname, sizeof (pty_name)); \
+ qxestrncpy (pty_name, ptyname, sizeof (pty_name)); \
pty_name[sizeof (pty_name) - 1] = 0; \
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches