[comp.sys.sun] Crisp / Grief / Brief editor summary

rohit@uunet.uu.net (Rohit Mehrotra) (10/08/90)

This is an update to the previous summary:

Some time back I had posted on the net, inquiring about if some one use
brief/crisp/grief editor on any Unix platform.

I got quite a few replies, either asking about it or detailing their
experience with it. The thing in common was that, who ever uses it loves
it.  Thanks a lot for all the hints / help / inquiries.

This editor goes by the name crisp or grief. Crisp is the most recent name
and the last revision available is version 1.9.  It is available on uunet
archive. 

It did not work for me on SCO-Xenix 2.3.2 initiallyi as the "list_buffer"
macro and "edit_file", "read_file" macro do not function properly. However
I compiled it on SCO-Unix machine by changing the CRISP.Inst file so that
the xenix files get linked, and then brought the executables across on
SCO-Xenix and guess what, that worked.

I am presently running it successfully under Sunview on SunOS4.1 on
SparcStation, on SCO-Xenix 2.3.2 on AT&T 386e and on SCO-Unix 3.2 on AT&T
386e.

If some one out their has terminal and keyboard macros for wyse60, tvi925,
SunMonitors for SunSparcstation etc i.e. the one present in
(/usr/local/crisp/macros/tty and /usr/local/crisp/macros/kbd) Please send
them to me and then I would archive it at uunet.


There are a few bugs, some of them I resolved, and some I could not. If
any one of you happens to know the fixes I would appreciate if you could
EMAIL me your response.  Here is a list of them which I encountered:

_____________________________________________________________________
1) Search and Translate do not work when using F5 and F6 key properly.
Solution:
the problem is that in the config.c file which came long with
the source code, F5 is defined as "search_fwd", which does not 
work. 
There are two fixes to it, any one would work:
Note the difference between "_" and "-".

a)  change the definition of F5 in config.c to "search-fwd" and 
    F6 to "translate-fwd" and then recompile.

b)  in the file ../src/crisp/crisp.m insert the following statement:

     (assign_to_key "<F5>"  "search-fwd");
     (assign_to_key "<F6>"  "translate-fwd");

   and then compile it as:

      cm -o /usr/local/crisp/macros/crisp.cm crisp.m

  you can do the same modifications in the ../src/crisp/tty/<termtype.m>
  file with the same result.

_____________________________________________________________________
2)  When I try to use bookmarks it gives a core dump.
    Solution: courtsey: uunet!proto!cims2!kew

There are actually a couple of fixes for this one, one of which was my
very lazy way out, and the other which addresses the low-level problem
(which makes my lazy fix make sense).

My fix was to add a macro:

---cut here---cut here---cut here---cut here---cut here---cut here---cut here

(macro _Goto_Bookmark
	(
		/* There's a major bug in the default goto_bookmark code
		** will cause it to dump core on occasion.  The code is
		** OK for the actual moving, but for some reason, when the
		** code has to prompt for a bookmark number, it gets goofy.
		** This code simply does the prompting.
		*/
		(int bm_number)

		(if (! (get_parm 0 bm_number "Goto Bookmarker [0-9]: "))
			(return))

		(if (&& (>= bm_number 0) (<= bm_number 10))
			(
				(goto_bookmark bm_number)
				(set_center_of_window)
			)
			;else
			(
				(message "Out of Range")
			)
		)
	)
)

---cut here---cut here---cut here---cut here---cut here---cut here---cut here

and you also have to add the following to crisp.m (where all of the other 
autoloads are), assuming that the abovemacro is contained in a file 
named bookmark.m:

	(autoload "bookmark" "_Goto_Bookmark")


This works but only puts a band-aid on the real problem which is addressed
by the following fix that came across the net the other day (Danger! I've not
tested this one):

(This was posted by:
	Stig Jacobsen
	shj@login.dkuug.dk )

Here's a ugly, kludgy patch for the bug that makes Crisp 1.9 coredump
when you try to goto a bookmark with Alt-G or the goto_bookmark
built-in. Feed the below text as input to patch.

== cut ==
*** builtin.c	Tue Sep 25 02:30:07 1990
--- ../crisp/builtin.c	Tue Sep  4 22:40:40 1990
***************
*** 397,402 ****
--- 397,407 ----
  		trace_acc();
  	bp->reference++;
  # endif
+    /* Couldn't find the size of 'argv', but 5 is a nice number... */
+    /* bookmark.goto_bookmark doesn't test argc and crashes if argv's */
+    /* beyond argc contains bogus stuff. This kludges around it. */
+    for (i=argc; i<5; i++)                                        /* shj */
+       argv[i].l_flags = F_NULL;                                  /* shj */
  	return free_saved(saved_str, ss_cnt);
  }
  free_saved(saved_str, ss_cnt)
== cut ==


So there you go.  Two fixes (one lazy, one more sophisticated), for one
problem. Hope this helps.

Also, I don't know if you're interested, but I developed a set of macros
that make crisp work well with sccs, doing automatic check-in's if the file
was checked out, searching for an sccs file if the file you asked for
doesn't exist, etc.  Give me a holler if you want the stuff; it's rather
poorly commented (as things we write for ourselves usually is). I also have
some rcs macros, but they are really peculiar to my circumstance, so I'm
hesitant to offer them (twist my arm).

keith
_____________________________________________________________________
3)  The column marking (mark 2) and inserting do not behave properly.
    No Solution.
_____________________________________________________________________

Thanks

Rohit Mehrotra
Fleet Credit Corporation
8325 NW 53rd St, Miami, Fl 33166.
EMAIL: dmdev!rohit@uunet.UU.NET or uunet!dmdev!rohit or dmdev!rohit@uunet.UUCP
VMAIL: 1-800-289-7500 ext 469, 1-305-477-0390 ext 469