Giter Club home page Giter Club logo

Comments (4)

rouseabout avatar rouseabout commented on May 26, 2024

LFN is disabled by default. _CRT0_FLAG_NO_LFN is set in _crt0_startup_flags.

To enable LFN, comment out _CRT0_FLAG_NO_LFN and disable the uppercase conversion in extract_token

diff --git a/command.c b/command.c
index aeea717..42a1651 100644
--- a/command.c
+++ b/command.c
@@ -116,7 +116,7 @@ extern char **environ;
 int _crt0_startup_flags =
        _CRT0_FLAG_USE_DOS_SLASHES |          // keep the backslashes
        _CRT0_FLAG_DISALLOW_RESPONSE_FILES |  // no response files (i.e. `@gcc.rf')
-       _CRT0_FLAG_NO_LFN |                   // disable long file names
+       //_CRT0_FLAG_NO_LFN |                   // disable long file names
        _CRT0_FLAG_LOCK_MEMORY |              // disable virtual memory
        _CRT0_FLAG_PRESERVE_FILENAME_CASE;    // keep DOS names uppercase
 char **__crt0_glob_function(char *_argument UNUSED) {return NULL;} // prevent wildcard expansion of arguments of main()
@@ -2563,6 +2563,11 @@ again:
     advance_iter(iter);
     return tok;
     }
+
+#ifdef __DJGPP__
+  /* only when using NO_LFN should we uppercase the wildcard token */
+  if ((_crt0_startup_flags & _CRT0_FLAG_NO_LFN))
+#endif
   strupr(iter->token);
   if (glob(iter->token, 0, NULL, &iter->gl))
     {

from comcom64.

stsp avatar stsp commented on May 26, 2024

That's interesting.
@andrewbird would you like to test
that change to make sure it actually
passes the LFN tests?

from comcom64.

andrewbird avatar andrewbird commented on May 26, 2024

Sorry I have no time today, but I don't think any of the tests use LFNs in the shell itself anyway.

from comcom64.

stsp avatar stsp commented on May 26, 2024

Indeed with a minimal testing it
appears to work. DIR displays LFNs,
COPY copies them properly, no
obvious buffer overflows...
What else is to desire? :)

from comcom64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.