Menu

#30 NEDIT_HOME

development
closed
Program (79)
5
2002-07-09
2001-11-22
No

(I don't know why I always forget this this SF thing.)

This will introduce the environmental variable
$NEDIT_HOME. If set, the names of the three NEdit
config files will be renamed as follows:

$HOME/.nedit -> $NEDIT_HOME/nedit.rc
$HOME/.neditmacro -> $NEDIT_HOME/autoload.nm
$HOME/.neditdb -> $NEDIT_HOME/nedit.history

This is checked on Linux and Solaris, the VMS name
creation algorithm is also checked.

Discussion

<< < 1 2 (Page 2 of 2)
  • Eddy De Greef

    Eddy De Greef - 2002-03-17

    Logged In: YES
    user_id=73597

    One more thing: are you sure about the way the VMS path
    names are generated? It looks suspicious to me, but I don't
    know how VMS specifies path names.

     
  • Thorsten Haude

    Thorsten Haude - 2002-03-17

    Logged In: YES
    user_id=119143

    I have separate functions because I want to avoid
    coupling. These are little more than glorified string
    copys, and any one of them could change in the future. If
    the naming system gets more elaborate, chances are that at
    least the autoload file name will be build differently, so
    extension is actually easier this way.
    I basically weighted DRY against KISS, and KISS won for me.

    What do you think?

    Wrt the dynamic allocation: Is that a bad thing?

     
  • Thorsten Haude

    Thorsten Haude - 2002-03-17

    Logged In: YES
    user_id=119143

    Wrt VMS: That's the best I could get out of the
    discussions in the list.

     
  • Eddy De Greef

    Eddy De Greef - 2002-03-18

    Logged In: YES
    user_id=73597

    Saying that it's easier to customize is a poor
    excuse for having duplicate code, especially
    since it's not 1 or two lines we're talking about,
    but a relatively complex piece of code (precondition
    checking, platform dependent, ...)

    If necessary, it's always easy to copy and paste
    shared functionality to customize it later on.

    Dynamic allocation is totally unnecessary here,
    so it should be avoided (it could only confuse
    leak detection tools). Moreover, there's absolutely
    no reason to use an X String iso. a char*, and the
    implicit conversion between the two in your code is
    to be avoided too.

     
  • Thorsten Haude

    Thorsten Haude - 2002-05-09

    Update 2002-05-09

     
  • Thorsten Haude

    Thorsten Haude - 2002-05-09
    • labels: --> Program
    • milestone: --> development
    • assigned_to: nobody --> yooden
     
  • Thorsten Haude

    Thorsten Haude - 2002-05-12

    Update 2002-05-12

     
  • Thorsten Haude

    Thorsten Haude - 2002-06-02

    Update 2002-06-02

     
  • Thorsten Haude

    Thorsten Haude - 2002-06-05

    Update 2002-06-05

     
  • Thorsten Haude

    Thorsten Haude - 2002-06-05

    Logged In: YES
    user_id=119143

    This thing now works like this:
    - If NEDIT_HOME is set, the filenames are as above,
    - else, if ~/.nedit is a file, the old names are used,
    - else, ~/.nedit is used as a directory, filenames as above.

    - Any directories wanted but not available are created (no
    trees).
    - Everything is nice and clean in one function (and three
    helper functions).
    - Two of the three helper functions might be useful
    elsewhere: isDir(filename) and isRegFile(filename).
    - VMS support is the best I could do without a box. I got
    help from some Mark Geary, Jack Patteeuw and Micheal Smith,
    but possibly mixed up a few things.

     
  • Thorsten Haude

    Thorsten Haude - 2002-06-23

    Update 2002-06-23

     
  • Eddy De Greef

    Eddy De Greef - 2002-07-09
    • status: open --> closed
     
  • Eddy De Greef

    Eddy De Greef - 2002-07-09

    Logged In: YES
    user_id=73597

    Closed since it was committed.

     
  • Thorsten Haude

    Thorsten Haude - 2002-07-09

    Logged In: YES
    user_id=119143

    Yup, and thanks to Alexander and Eddy.

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.