jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Filelist mode on VMS


John E. Davis wrote::
Terrence Branscombe <tlbranscombe@xxxxxxx> wrote:

It is another example of a function that was not implemented for VMS.
This function should be defined in src/slposdir.c in the slang source
code.  If you provide me with a working version of listdir, then I
will add it to a future slang release.  I suspect that something like
lib$find_file / lib$find_file_end will be required.

That would be way beyond my pay grade. My programming skill is limited to writing VBA macros for the most part. VMS is a part-time hobby, and just understanding enough to get things configured properly is challenge enough. :^)

In recent years,
it appears that the VMS C run time library has adopted a number of POSIX
functions, so you may be able to reuse the Unix code in slposdir.c
(opendir/readdir/closedir).

In the meantime, you might play with something like:

   define listdir (dir)
   {
      variable tmp = "SYS$LOGIN:listdir.tmp";
      variable cmd = sprintf ("dir/output=%s %s", tmp, dir);
      () = system (cmd);
      variable list = fgetslines (fopen(tmp,"r"));
      list = array_map (String_Type, &strtrim, list);
      () = remove (tmp);
      return list;
   }

I probably have the output qualifier all wrong, and you may require
addition qualifier to the "dir" command to get single column output.
Hopefully the idea is clear.

I certainly like to play.  Thanks for the starter kit.


Thanks,
--John

Cheers,
Terry


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.




--
+-----------------+
Terrence Branscombe

Jabber: tbransco@xxxxxxxxx
   IRC: /server montreal.qc.undernet.org /dcc chat ue191
   ICQ: 327103761
   MSN: QSOZJLJQTVYJ@xxxxxxxxxxxxx
+-----------------+

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]