Skip to content

Commit a9784f9

Browse files
committed
Change control codes in MPI protocol
As suggested in discussion of #1182, adopt the following protocol for MPI `SOH header STX payload ETX` also use octal codes in elisp for better readability
1 parent f5f54f2 commit a9784f9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

etc/ESSR/R/mpi.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
else as.character(el)
88
})
99
payload <- paste(dots, collapse = "")
10-
cat(sprintf("\034%s\036%s\035", head, payload))
10+
cat(sprintf("\001%s\002%s\003", head, payload))
1111
}
1212

1313
.ess_mpi_message <- function(msg){

lisp/ess-tracebug.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,9 @@ Kill the *ess.dbg.[R_name]* buffer."
11831183

11841184
;; http://jkorpela.fi/chars/c0.html
11851185
;; https://en.wikipedia.org/wiki/ANSI_escape_code#Escape_sequences
1186-
(defvar ess-mpi-message-start-delimiter "")
1187-
(defvar ess-mpi-message-field-separator "")
1188-
(defvar ess-mpi-message-end-delimiter "")
1186+
(defvar ess-mpi-message-start-delimiter "\001")
1187+
(defvar ess-mpi-message-field-separator "\002")
1188+
(defvar ess-mpi-message-end-delimiter "\003")
11891189

11901190
(define-obsolete-variable-alias 'ess-mpi-alist 'ess-mpi-handlers "ESS 19.04")
11911191
(defvar ess-mpi-handlers
@@ -1229,7 +1229,7 @@ value from EXPR and then sent to the subprocess."
12291229

12301230
(defun ess-mpi-handle-messages (buf)
12311231
"Handle all mpi messages in BUF and delete them.
1232-
The MPI message has the form TYPEFIELD... where TYPE is the
1232+
The MPI message has the form TYPEFIELD... where TYPE is the
12331233
type of the messages on which handlers in `ess-mpi-handlers' are
12341234
dispatched. And FIELDs are strings. Return :incomplete if BUF
12351235
ends with an incomplete message."

0 commit comments

Comments
 (0)