[Git][cmucl/cmucl][issue-139-add-alias-local-external-format] 6 commits: Update release-21e.md with closed issues.
Raymond Toy (@rtoy)
gitlab at common-lisp.net
Thu Nov 3 14:15:56 UTC 2022
Raymond Toy pushed to branch issue-139-add-alias-local-external-format at cmucl / cmucl
Commits:
d5f1aa5e by Raymond Toy at 2022-11-01T20:35:49+00:00
Update release-21e.md with closed issues.
- - - - -
402c0c01 by Raymond Toy at 2022-11-02T01:00:20+00:00
Fix #150: add aliases cp949 euckr
- - - - -
d825aa54 by Raymond Toy at 2022-11-02T01:00:20+00:00
Merge branch 'issue-150-add-aliases-cp949-euckr' into 'master'
Fix #150: add aliases cp949 euckr
Closes #150
See merge request cmucl/cmucl!106
- - - - -
33c760fa by Raymond Toy at 2022-11-03T04:47:09+00:00
Fix #149: Call setlocale(3C) on startup
- - - - -
317a33f8 by Raymond Toy at 2022-11-03T04:47:10+00:00
Merge branch 'issue-149-add-setlocale' into 'master'
Fix #149: Call setlocale(3C) on startup
Closes #149
See merge request cmucl/cmucl!105
- - - - -
3c122c6c by Raymond Toy at 2022-11-03T07:14:07-07:00
Merge branch 'master' into issue-139-add-alias-local-external-format
- - - - -
7 changed files:
- src/code/save.lisp
- src/code/unix.lisp
- src/general-info/release-21e.md
- src/i18n/locale/cmucl-unix.pot
- src/lisp/os-common.c
- src/pcl/simple-streams/external-formats/aliases
- tests/issues.lisp
Changes:
=====================================
src/code/save.lisp
=====================================
@@ -273,7 +273,11 @@
(reinit)
(environment-init)
(dolist (f *after-save-initializations*) (funcall f))
+ ;; Set the runtime locale
+ (unless (zerop (unix::unix-setlocale))
+ (warn "os_setlocale failed"))
(stream::load-external-format-aliases)
+ ;; Set the locale for lisp
(intl::setlocale)
(ext::process-command-strings process-command-line)
(setf *editor-lisp-p* nil)
=====================================
src/code/unix.lisp
=====================================
@@ -2894,6 +2894,12 @@
doesn't work."
(int-syscall ("fork")))
+(defun unix-setlocale ()
+ _N"Call setlocale(3c) with fixed args. Returns 0 on success."
+ (alien:alien-funcall
+ (alien:extern-alien "os_setlocale"
+ (function c-call:int))))
+
(defun unix-get-locale-codeset ()
_N"Get the codeset from the locale"
(with-alien ((codeset (array c-call:char 512)))
=====================================
src/general-info/release-21e.md
=====================================
@@ -51,14 +51,18 @@ public domain.
* ~~#113~~ REQUIRE on contribs can pull in the wrong things via ASDF.
* ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
* ~~#122~~ gcc 11 can't build cmucl
+ * ~~#124~~ directory with `:wild-inferiors` doesn't descend subdirectories
* ~~#125~~ Linux `unix-stat` returning incorrect values
* ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
* ~~#128~~ `QUIT` accepts an exit code
+ * ~~#130~~ Move file-author to C
* ~~#132~~ Ansi test `RENAME-FILE.1` no fails
* ~~#134~~ Handle the case of `(expt complex complex-rational)`
* ~~#136~~ `ensure-directories-exist` should return the given pathspec
* #139 `*default-external-format*` defaults to `:utf-8`
* ~~#142~~ `(random 0)` signals incorrect error
+ * ~~#147~~ `stream-line-column` method missing for `fundamental-character-output-stream`
+ * ~~#149~~ Call setlocale(3C) on startup
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
src/i18n/locale/cmucl-unix.pot
=====================================
@@ -1424,3 +1424,7 @@ msgid ""
" doesn't work."
msgstr ""
+#: src/code/unix.lisp
+msgid "Call setlocale(3c) with fixed args. Returns 0 on success."
+msgstr ""
+
=====================================
src/lisp/os-common.c
=====================================
@@ -776,6 +776,15 @@ exit:
return result;
}
+int
+os_setlocale(void)
+{
+ char *result = setlocale(LC_ALL, "");
+
+ /* Return 0 if setlocale suceeded; otherwise -1. */
+ return result != NULL ? 0 : -1;
+}
+
void
os_get_locale_codeset(char* codeset, int len)
{
@@ -787,3 +796,4 @@ os_get_locale_codeset(char* codeset, int len)
strncpy(codeset, code, len);
}
+
=====================================
src/pcl/simple-streams/external-formats/aliases
=====================================
@@ -223,6 +223,8 @@ windows-cp1252 cp1252
windows-latin1 cp1252
ms-ansi cp1252
+euckr euc-kr
+cp949 euc-kr
;; These are not yet implemented
;;iso-2022-jp iso2022-jp
;;iso2022jp iso2022-jp
=====================================
tests/issues.lisp
=====================================
@@ -745,3 +745,10 @@
(assert-equal (map 'list #'char-name string)
(map 'list #'char-name (read-line s))))))
+
+(define-test issue.150
+ (:tag :issues)
+ (let ((ext:*gc-verbose* nil)
+ (*compile-print* nil))
+ (assert-true (stream::find-external-format :euckr))
+ (assert-true (stream::find-external-format :cp949))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7b17a82e5dbf2f33dd30cf28c6de13ebb3fbc370...3c122c6c4ff141f6d5d540f0bba13761a615b18b
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7b17a82e5dbf2f33dd30cf28c6de13ebb3fbc370...3c122c6c4ff141f6d5d540f0bba13761a615b18b
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20221103/590ad6bf/attachment-0001.html>
More information about the cmucl-cvs
mailing list