-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Chris F.A. Johnson on 3/29/2008 10:53 AM: |> Also, on platforms where // is special (such as cygwin), 'basename //' |> and 'basename // /' should print '//', not '/', to match the behavior of the |> basename program on those platforms. | | " | 2. If string is "//", it is implementation-defined whether steps 3 | to 6 are skipped or processed. | " | | I see no reference in the spec to "// /". Can you tell me where it | is?
If the implementation defines "//" to be a synonym for "/" (and Linux does this), then you can choose to process steps 3-6, but process ends in step 3 where the result is "/". If the implementation defines "//" as distinct from "/" (as is the case on cygwin), or if you choose to preserve "//" even though it is not special, then you skip steps 3-6, so you don't do any suffix stripping from step 6, and the result is "//". Either way, "basename // /" doesn't do any suffix stripping (for that matter, NO suffix that contains / will ever participate in suffix stripping). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfuln4ACgkQ84KuGfSFAYDoVgCePGgfg0z0a9S4wzaanVYNWSYh Cy8An3jVoxRZFZxdK+ZxJHJM4yv1Y16t =+vTT -----END PGP SIGNATURE-----