1
0
mirror of synced 2026-01-13 15:37:38 +00:00

30 Commits

Author SHA1 Message Date
rmkaplan
5b37dd09db
Rmk32 eol convention for input defaults to ANY, extend OPENSTREAM so that EOL can be specified as an "external format" (#1785)
* FILEIO: EOL for input defaults to ANY, EXT-FORMAT can specify EOL

As per technical meeting on 7/15/2024

* Revert "FILEIO: EOL for input defaults to ANY, EXT-FORMAT can specify EOL"

This reverts commit 6a7e8c3665bbdcb401f81aa49eadb603874fb4b2.

* FILEIO:  Fix comment

* Added DETECTEDEOLCONVENTION to STREAM declaration

and recompiled calls to macro \CHECKEOLC.

* COMAPARETEXT:  was trying to set EOL to ANY on a Tedit stream

* LCOMS needing to be recompiled for \CHECKEOLC macro and Create STREAM

(plus a new (unchanged) version of IOCHAR needed to get the cleanup to work for the recompile)

* EXTERNALFORMAT macro and function implement EOL detection

* FILEIO: stream records detected EOL, also RENAMEFILE uses COPYBYTES

UFS doesn't check file devices identity, doesn't give type-change message.  Recompiled for create stream

* ADIR has TRUEDEVICE

* Revert "FILEIO: stream records detected EOL, also RENAMEFILE uses COPYBYTES"

This reverts commit fa97aa61575f3ba0876b9ad6aadebf2892a0cb15.

* Revert "EXTERNALFORMAT macro and function implement EOL detection"

This reverts commit eb098615edbc32961558ec3ba42fdf0d712cafa4.

* Revert "LCOMS needing to be recompiled for \CHECKEOLC macro and Create STREAM"

This reverts commit 5967452c637861fda6a0e24db32ec387451cc085.

* Revert "Added DETECTEDEOLCONVENTION to STREAM declaration"

This reverts commit 196f105cf5e536e7d14736863a359fca673d69a4.

* Trying to complete the ANY/EOLC and binary RENAMEFILE issues

* loadup glitch
2024-12-25 13:06:35 -08:00
rmkaplan
934d0fb7a4
Move charset management to externalformat (addresses #1454) (#1455)
* Move charset management to externalformat (addresses #1454)

Removed IMCHARSET from IMAGEOPS declaration, added FORMATCHARSETFN to EXTERNALFORMAT, put XCCS charset handling in the XCCS externalformat.

* XCCS, fixed a glitch

* UNICODE: Remove merge conflict

* Fix typo CLFUNCALL, MAKEFILE NEW and BCOMPL (versions didn't match)

---------

Co-authored-by: Larry Masinter <lmm@acm.org>
2024-01-12 11:42:22 -08:00
rmkaplan
017bf88a3a
FILEIO: OPENSTREAM parameters default to STREAMPROP (#1335)
also add LINELENGTH
2023-11-29 06:47:14 -08:00
Larry Masinter
540aff091c
When restarting after logout, don't print warning on closed stream (#990) 2022-10-12 12:00:43 -07:00
Larry Masinter
882fbacf59
when constructing a stream, it might not have a FDEV -- allow it to print (#984)
* when constructing a stream, it might not have a FDEV -- alow it to print

* Stream with no FDEV just prints as Stream
2022-10-10 18:56:43 -07:00
rmkaplan
92f85c5957
Rmk64: mainly separate panels for GITFNS display, FILEPOS speed up (#862)
* HRULE:  Add a PREPRINTFN for horizontal rules

Looks better in plaintext files

* GITFNS, COMPAREDIRECTORIES:  Group earler/later in separate segments

GIT-CDBROWSER-SEPARATE-DIRECTIONS defaults to T

* FILEIO: INITVARS rather than VARS for FILING.TYPES

To avoid contamination with values from other files (like LAFITE)

* FILEPKG: SEPRCASE in EDITCALLERS includes comma and quote even if no DWIMIFYCOMPLFG

Also seprate the caseinsensitive UPPERCASEARRAY from the SEPRCASE array

* IOCHAR: Open code the call to \INCCODE.EOLC

About a 30% speed up in the slow (casearray/skip) case.  Eventually macros should be defined for the externalformat interface functions, for now it is nice to be able to trace/break them.

* EXTERNALFORMAT: a little bit of cleanup

particularly around EOLC
2022-07-25 19:12:52 -07:00
rmkaplan
6376579b1c
Rmk63 backccode peekccode eolc (#853)
* EXTERNALFORMAT,UNICODE,XCCS: Consistent naming of \PEEKCCODE(.EOL), \BACKCCODE returns the code

It was confusing that the naming of the peek functions was inconsistent with the inccode and backccode functions with respect to the EOLC qualifier.  Now uniformaly, the unqualified names (\PEEKCCODE, \BACKCCODE, \INCCODE) do not do any EOL interpretation.  The qualified-name functions (\PEEKCCODE.EOLC, \INCCODE.EOLC, \BACKCCODE.EOLC) do EOL interpretation.

Also, the \BACKCCODE interface is changed so that it returns the code corresponding to the bytes that it passed over.  This simplifies some of the callers.

* Clients of \PEEKCCODE \BACKCCODE and .EOL

Small changes either to fix inconsistencies (backing, reading, peeking with inconsistent EOL interpretation), updating the names in a few other cases, a few simplifications.

* glitches in ATERM, HARDCOPY updates
2022-07-21 10:36:19 -07:00
rmkaplan
8ee32f6243
Rmk55 gitfns with redirect (#826)
* CLIPBOARD, FILEIO: external format

CLIPBOARD uses SYSTEM-EXTERNALFORMAT.
FILEIO:  added sourceparameters argument to COPYFILE, so format can be specified.

* GITFNS:  rework to avoid hanging process stream

Redirects command output to tmp output and error streams, at most only looks for a COMPLETED signal in the process stream (which still sometimes hangs)

* EXAMINEDEFS:  Asks for a menu position on a keyboard call

(Otherwise, the chunk menu may be buried under the TTY window)
2022-07-15 18:01:30 -07:00
rmkaplan
718d9f988c
Rmk52 fix external format for error stream (#817)
* CLSTREAMS: Fix EOL/external format on error stream (synonym and 2-way) #815

* CMLFORMAT: makefile NEW to get functions in filemap

* CLSTREAMS: cleanup formats for more types

* FILEIO:  Add readonly bit in streams for external-format
2022-07-09 17:08:16 -07:00
rmkaplan
d7ca40ebeb
Rmk51 end game of external format integration (#814)
* Compile device-creation functions for new default interface

* UNICODE:  minor bug

* LLINTERP: MOVD? APPLY* to SPREADAPPLY*

* External format interface: a few more adjustments

* CLSTREAMS: Recompile, no source change

* PRETTYFILEINDEX: suppress when printing gitmaps to a non-display stream

* UNIXCOMM: Default format comes from device

Also, I seemed to have reverted back to LCOM with FAKE-COMPILE-FILE
2022-07-03 18:49:04 -07:00
rmkaplan
eb33dcc7eb FILEIO: Added DEPTh parameter to \GENERATEFILES
Binds FILING.ENUMERATION.DEPTH, uses free value of DEPTH not specified
2022-04-24 13:36:31 -07:00
Larry Masinter
6ec792510f
simplify DEFAULTFILETYPELIST initialization (#735) 2022-03-08 09:41:50 -08:00
rmkaplan
e3f9a4ca9a FILEIO: Recirculated FDEV fields that had been evacuated during external format transformation
FDEV1...FDEV4 now available (used by PSEUDOHOSTS)
2022-01-24 21:03:15 -08:00
rmkaplan
2dcfac5350
Rmk12: Lispusers packages of general utility, but especially for git compare (#634)
* TEXTOFD:  Property OBJECTBYTE returned instead of image objects

This allows COMPARETEXT to work on TEDIT files

* ATBL: Default reader environment uses *DEFAULT-EXTERNALFORMAT* instead of :XCCS constant

* CMLEXEC:  Fix FILETYPE property

It had CL:COMPILE-FILE, but the directory had LCOMs.  Changed to :FAKE-COMPILE-FILE.

* FILEIO:  single place for EOL specification

Now only in SETFILEINFO, not separately in \DO.PARAMS.AT.OPEN

* WINDOWOBJ:  COPYINSERT now uniformly allows lists of objects

It was incomplete.

* COMPARETEXT: Now works for TEDIT files

* EXAMINEDEFS: side-by-side attached SEDIT windows for comparing alternative definitions

* OBJECTWINDOW:  container for arbitrary image objects
2021-12-22 20:56:57 -08:00
rmkaplan
cde5c9018d FILEIO: allow EOLCONVENTION ANY for input files
Any occurrence of CR, LF, CRLF maps to EOL, to facilitate processing of text files of unknown provenance
2021-12-16 20:11:56 -08:00
rmkaplan
db3ca49564 Localize external format implementation in new EXTERNALFORMAT file
Pieces moved from FILEIO and LLREAD, EXTERNALFORMAT added to FILESETS
2021-09-25 22:48:04 -07:00
rmkaplan
b760d005fb
Second recompile fdev #457 (#463)
* FONTPROFILE:  Fix NS COMMENTFONT, delete FONTPROFILEPATCH

This reverts commit 2615140ede9117b722f555e6603029f20274dd0e.

* Recompile FDEV creators with FILEIO defaulting to :XCCS

* FONTPROFILE: Fixed COMMENTFONT in BIGGERNS

* FONTPROFILE:  fixed typo
2021-09-07 11:52:14 -07:00
Larry Masinter
4bb4457d55 Revert "Recompiled all FDEV creators to install *DEFAULT-EXTERNALFORMAT* (#458)"
This reverts commit 2615140ede9117b722f555e6603029f20274dd0e.
2021-09-06 09:04:00 -07:00
rmkaplan
2615140ede
Recompiled all FDEV creators to install *DEFAULT-EXTERNALFORMAT* (#458) 2021-09-05 16:39:51 -07:00
rmkaplan
0d2c6622bb
Format implementation functions set a known variable *BYTECOUNTER* (#402)
* Format implementation functions set a known variable *BYTECOUNTER*

The generic functions deal with updating the application variable.
\INCHAR eliminated in favor of \INCCODE.EOLC to make clear what it does.
OPENSTRINGSTREAM streams have their own format, and the string is always fattened.
READBITMAP doesn't mix character and byte reading

* AOFD: Don't execute \STRINGSTREAM.INIT

This creates a file device that is not used anywhere.  The function OPENSTRINGSTREAM provides the functionality that this file device suggests that it would provide, but that functionality seems suspect at best.  The function is left in the system for now, probably should be deleted at some point in the future so we don't try to maintain it if we trip over it.

* TTYIN:  Fix an ancient coding error

but still doesn't solve the  (DIRECTORY ?=  problem #402

* LLREAD, FILEIO, XCCS:  Improve charcode backing, copychars

Added \BACKCCODE.EOLC that backs up over EOL encoding bytes, simplifies \RSTRING2.
\XCCSBACKCCODE returns T/NIL according to whether it succeeded.
\XCCSOUTCHAR uses IPLUS16 for CHARPOSITION
COPYCHARS makes no assumptions about EOL encoding
But still no solution for #402

* LLREAD, TTYIN.LCOM    fix #402

The bug showed up in TTYIN, but it was actually a bad edit in the generic backccode.

TTYIN.LCOM is just a recompile--that had never been done with various new declarations.
2021-08-15 18:45:04 -07:00
rmkaplan
3de2ebb719 FILEIO UNICODE: Fix THROUGHIN, cleanup UTF8-16 back 2021-08-06 10:36:05 -07:00
rmkaplan
b1d209484a FILEIO, MACHINEINDEPENDENT
\EXTERNALFORMAT extracts the format from a reader-environment
WRITEFILE uses the format in *OLD-IINTERLISP-READ-ENVIRONMENT* (now :XCCS)
2021-08-05 21:08:05 -07:00
rmkaplan
c94e044bf3 FILEIO: Fix bad IF statement in \EXTERNALFORMAT 2021-08-05 14:44:01 -07:00
rmkaplan
4ea68c6746 Store FDEV's default externalformat in the FDEV
And related adjustments so that the display output stream (which is created in various places) is always created with the right (CR) EOL convention.  Also a little simpler interface for creating external formats.
2021-08-02 19:56:19 -07:00
rmkaplan
925adc1deb DEFINE-FILE-INFO with its own reader environment
Including format.  That reader environment also allows colon as a package delimiter, in addition to the funky control and upper panel character.

"Function" is now a synonym for character set 2.  WITH-READER-ENVIRONMENT doesn't bind EXTERNALFORMAT.
2021-07-30 19:37:48 -07:00
Larry Masinter
4efe2f93af
Merge (rebase) Cleanup-character-IO-interfaces with master (#356)
* Cleanup  of character IO interface

Committing this branch for further testing.  I know at least that the TTY output stream somehow is defaulting to :XCCS, which is wrong, but I haven't yet found the interface for that.

* Clean out \NSIN etc

No top-level calls to the NS specific functions, just to the generic \OUTCHAR etc.

Updated full.database

* MODERNIZE: added dragging for fixed-menu windows

They can be dragged by their title bars

* UNICODE:  Added Greek to the default set

Also made spelling of default-externalformats consistent with FILEIO

* FASLOAD: EOL conversion in FASL::READ-TEXT

EOL's printed as LF's will be read as EOL

* LLREAD:  Added meta as a CHARACTERSETNAME

meta,a maps to 1,a now.  But slowly propagating this to TEDIT, SEDIT, etc will make it easier to change the coding of meta characters, e.g. as part of a Unicode transition.

* APRINT FILEIO LLREAD: \OUTCHAR now a closed function

Removed the macro

* LLKEY: call CHARCODE.DECODE directory in \KEYACTION1

Minor cleanup, avoid typical user entry and APPLY*

* WHEELSCROLL: re-enable on AFTERMAKESYS/SYSOUT FORMS

Also sets up mappings in the \COMMANDKEYACTIONS, whatever that is

* ABASIC:  NILL and ZERO change from LAMBDA NOBIND to LAMBDA NIL

So that things like Masterscope don't break

* MASTERSCOPE:  Added WHEREIS as last-resort for CONTAINS

Looks at the WHEREIS database, if present, for FNS and FUNCTIONS if it has no other information.  . WHO CONTAINS ANY CALLING FOO works, but not the inverse:  . WHO DOES FUM CONTAIN.  We still need to figure out why the CONTAINS table isn't populated

* POSTSCRIPTSTREAM: use standard \OUTCHAR conventions

Now uses generic \OUTCHAR to get the proper function from the stream (or default)

* Recompile with right EXPORTS.ALL

Some of the macros weren't correct.

* Fix POSTSCRIPTSTREAM

Cleaner separation between external \OUTCHAR and internal BOUT

* POSTSCRIPTSTREAM gets its own external format

* Minor fix

* Compile-time warning about EXPORTS.ALL

* MODERNIZE:  Modern button fn has same args as the original

For Notecards  #343

* Fixed another glitch in the MODERNIZE  arglist thing

\TEDIT.BUTTONEVENTFN actually takes a second STREAM argument.  I don't see where it is ever called with that.  The modernize replacement binds that argument, but it isn't being passed to the original.

* FILEWATCH:  added missing record field

* Update FILEWATCH.LCOM

* Eliminating record/type name conflicts

Mostly just qualifying references, more work to get BIGBITMAP stuff out of ADISPLAY and to eliminate ambiguity of LINE record (now XXLINE in XXGEOM)

* Compile away open calls to \OUTCHAR, add loadups/full.database

Mostly new LCOMS where \OUTCHAR calls were compiled open

* Remove garbage library/XCCS

Old tools for reading wikipedia XCCS tables, sources/XCCS will deal with XCCS external format

* Next step:  Remove open input-character calls, factor XCCS to separate file

XCCS is the default, but can be swapped out (eventually) by setting a few variables, without recompiling everything

* Lots of residual cleanup for XCCS isolation

* Delete old file MACINTERFACE (migrated to MODERNIZE)

* Eliminate straggling NS calls:  LAFITE, READINTERPRESS

* Typo

* READINTERPRESS:  removed CHARSET

* MODERNIZE: Interface to control title-bar response (for Notecards)

* Many changes for external format name consistency

Very close to the end of this

* Put :FORMAT in file info, fix TEDIT plaintext hardcopy

I distributed :FORMAT :XCCS as the default marking, but somehow one of the variables seems to get revert during the loadup.  This is correct, as far as it goes.

* Getting the format in the file-info

This is all very twisty, different variables set in different places.  It now seems to do the right thing, at least for new files.  Marks them with :FORMAT :XCCS.

* Another fileinfo glitch

* CLIPBOARD -UNICODE:  Make UTF8 to UTF-8 to match standards

* MODERNIZE:  fix bug in MODERWINDOW

* External format as MAKEFILE option, LOAD applies the file's format

(MAKEFILE 'XX '((FORMAT :UTF-8)))
  will dump XX as a UTF-8 file.  LOAD will load it back to XCCS internal.

* Compilers respect DEFINE-FILE-INFO format

* MODERNIZE:  little glitch

* Delete old FILEIO.LCOM

* More edge cases of external format thru MAKEFILE, PRETTY, PRETTYFILEINDEX etc.

* FILEBROWSER:  Can SEE UTF-8 Lisp sourcefile

* INSPECT:  Better macro for inspecting readtables

* recompile changed files and do new loadup

Co-authored-by: rmkaplan <ron.kaplan@post.harvard.edu>
2021-07-29 17:07:23 -07:00
rmkaplan
f0ad3c5f60
All source files converted to LF (#315)
* All source files converted to LF

Also, HPRINT:  EQUALALL knows about CL arrays
FILEIO:  STREAM record with fields for external format functions

* Delete makeinit.dribble

* Converted CR to LF on internal/library and docs/Documentation Tools
2021-04-28 15:36:03 -07:00
Larry Masinter
6424116dc9 massive reorganization 2020-11-15 19:22:14 -08:00
Larry Masinter
6a758f1aa9 make medley repo match Ron's dropbox
this will give us a stable point on which we can make changes in coordination via git.
NO MORE USING A SHARED DROPBOX
Last major commit wihout a PR against a Medley issue.
2020-10-29 15:31:53 -07:00
Larry Masinter
851925875d initial checkin for sources 2020-08-29 18:36:46 -07:00