[comp.os.minix] elvis/virecover problems with %x v.s. %X

drg50@ccc.amdahl.com (Dave Gavin) (12/06/90)

I'm having a problem with vi (elvis) that has brought up what I think is a
problem with sprintf/printf. Please bear with me as I'm new to Minix and
may be bringing up old news !
Scenario: using elvis (via vi link), while in input mode I get an "Alarm",
dropping me back to a prompt (PS1), but I'm locked up, no input other than
F1, F2, or ALT+CTL+F9 gets any response. So I A+C+F9 back to a login
prompt and try to return to my vi session;
    a. vi says that the file is busy
    b. virecover says that there is no elvt123E0302 file to recover
    c. in /usr/tmp there is a elvt123e0302 file (note the lower case e)
    d. if I "mv elvt123e0302 elvt123E0302" virecover will find the file
       and all is well.
 So I assume that there is a problem with elvis creating the tmp file
with a %x format, while virecover is constructing the name using %X,
but when I examined the code for virecover.c and tmp.c I found that they
both use the format from the header file which uses the lower case %x.
I continued on down to the doprintf.c library code which appears OK, but I
rebuilt it anyway to no avail. I then wrote a one-liner C program that
prints out a hex value with %x and %X - guess what ?
They both print out the same - upper case A-F!
 I think that the version of elvis that I have was perhaps compiled
under a different compiler which supports the %x vs. %X distinction,
as it apparently cannot be compiled under Minix as yet, while virecover
was compiled with the native library code.

 Bottom line: I don't know how to migrate the library code to MS-DOS
to re-compile elvis, so I can't change elvis to use upper case hex,
and re-compiling virecover doesn't help as I seem to have library
code that doesn't support lower case hex.
  Any suggestions ?
-- 
This space for rent.      |David Gavin - Amdahl Corp. - Boston, MA
                          |           drg50@juts.ccc.amdahl.com