In message <[EMAIL PROTECTED]> on Mon, 22 Jul 
2002 08:00:23 -0700 (PDT), Doug Kaufman <[EMAIL PROTECTED]> said:

dkaufman> I am not sure that I understand the question. Where do I keep ".exe"
dkaufman> at the end? The end of what? After copying dummytest.c to ideatest.c
dkaufman> and compiling, I get the same result whether I execute as "./ideatest"
dkaufman> or as "./ideatest.exe", i.e., "No IDEA support". Sorry if I missed
dkaufman> something (I am not a programmer). I did not intend to change anything
dkaufman> in regard to suffixes.

The following change would keep ".exe" at the end of the string.
However, I recall that DOS would remove an extension, so even if you
type .\ideatest.exe, you end up with ".\ideatest" in argv[0].  This is
not the case on VMS.

--- test/dummytest.c    2002-07-22 18:11:18.000000000 +0200
+++ /home/levitte/dist/dummytest.c      2002-07-22 18:08:01.000000000 +0200
@@ -28,9 +27,8 @@
                program = BUF_strdup("(unknown)");
        else
                {
-               program = OPENSSL_malloc(q - p + 1);
-               strncpy(program, p, q - p);
-               program[q - p] = '\0';
+               program = OPENSSL_malloc(strlen(p) + 1);
+               strcpy(program, p);
                }
 
        for(p = program; *p; p++)

I understand, however, why you made that change, now that I looked a
little more closely at the rest of the changes.  I made the following
change to your change:

--- /home/levitte/dist/dummytest.c      2002-07-22 18:08:01.000000000 +0200
+++ test/dummytest.c    2002-07-22 18:11:18.000000000 +0200
@@ -19,6 +19,7 @@
        if (!p) p = strrchr(argv[0], ':');
        q = 0;
 #endif
+       if (p) p++;
        if (!p) p = argv[0];
        if (p) q = strchr(p, '.');
        if (p && !q) q = p + strlen(p);
@@ -27,8 +28,9 @@
                program = BUF_strdup("(unknown)");
        else
                {
-               program = OPENSSL_malloc(strlen(p) + 1);
-               strcpy(program, p);
+               program = OPENSSL_malloc(q - p + 1);
+               strncpy(program, p, q - p);
+               program[q - p] = '\0';
                }
 
        for(p = program; *p; p++)
@@ -38,7 +40,7 @@
        if (q > p && q[-1] == '_') q--;
        *q = '\0';
 
-       printf("No %s support\n", program + 1);
+       printf("No %s support\n", program);
 
        OPENSSL_free(program);
        return(0);



dkaufman> With the changes, I can exclude algorithms (e.g. idea, rc5, and mdc2)
dkaufman> and can then do: make, make depend, make, make test, and make install
dkaufman> without any problems when running under DJGPP. I didn't test other
dkaufman> platforms.

Cool, thanks for testing.

-- 
Richard Levitte   \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to