Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| ecce.c [2023/07/29 01:53] – peron | ecce.c [2026/04/21 16:06] (actual) – editor externo 127.0.0.1 | ||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| - | <code c> | + | <file c ecce.c> |
| - | /* Este fichero es http:// | + | |
| - | It is written in reasonably portable C and should | + | |
| - | be easy to compile with any C compiler, eg on Linux: | + | |
| - | cc -o ecce -DWANT_UTF8 ecce.c | + | |
| - | + | ||
| - | You may need to do: export LC_ALL=en_US.UTF-8 | + | |
| - | + | ||
| - | | + | |
| - | a couple of places where linux filenames are used - | + | |
| - | you may need to make some small changes if compiling | + | |
| - | for Windows or other non-unix systems. | + | |
| - | in the source below. | + | |
| - | to gtoal@gtoal.com please. | + | |
| - | even a linux system is single-user. | + | |
| - | | + | |
| - | | + | |
| - | bad actors. | + | |
| - | + | ||
| - | | + | |
| - | of ecce in Emacs, by making a version of the " | + | |
| - | | + | |
| - | to pass the ecce command as a parameter while avoiding | + | |
| - | | + | |
| - | + | ||
| - | + | ||
| - | *SYS* | + | |
| - | Agrega esto a tu fichero ~/.emacs (o algún equivalente de Windows): | + | |
| - | + | ||
| - | ;; hex encoding needed below. Came from https:// | + | |
| - | (eval-when-compile | + | |
| - | (defmacro num-to-hex-char (num) | + | |
| - | `(aref " | + | |
| - | ) | + | |
| - | + | ||
| - | (defun encode-hex-string (string) | + | |
| - | " | + | |
| - | (let* ((len (length string)) | + | |
| - | (dst (make-string (* len 2) 0)) | + | |
| - | (idx 0)(pos 0)) | + | |
| - | (while (< pos len) | + | |
| - | (aset dst idx (num-to-hex-char (/ (aref string pos) 16))) | + | |
| - | (setq idx (1+ idx)) | + | |
| - | (aset dst idx (num-to-hex-char (% (aref string pos) 16))) | + | |
| - | (setq idx (1+ idx) pos (1+ pos))) | + | |
| - | dst)) | + | |
| - | + | ||
| - | ;; Embedded ECCE support | + | |
| - | + | ||
| - | (defun e (ecce_command) | + | |
| - | (interactive "sEcce> ") | + | |
| - | (let (oldpoint (point)) | + | |
| - | (setq oldpoint (point)) | + | |
| - | (call-process-region (point-min) (point-max) | + | |
| - | "/ | + | |
| - | t t nil | + | |
| - | " | + | |
| - | | + | |
| - | | + | |
| - | (format " | + | |
| - | ) | + | |
| - | ) " 2> ~/ | + | |
| - | ) | + | |
| - | (goto-char (point-min)) | + | |
| - | (search-forward (format " | + | |
| - | (replace-match "" | + | |
| - | ) | + | |
| - | ) | + | |
| - | + | ||
| - | (global-set-key " | + | |
| - | + | ||
| - | */ | + | |
| #define VERSION " | #define VERSION " | ||
| | | ||
| Línea 2047: | Línea 1975: | ||
| | | ||
| } | } | ||
| - | <code> | + | </file> |
