-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various utils (at least dos33fs-utils and prodos-utils): documentation of options placement is wrong on BSD-ish platforms. #18
Comments
Thanks for figuring this one out @micahcowan, I had the same problem, I will see if I can find some special #define as you suggest |
jquast
added a commit
to jquast/dos33fsprogs
that referenced
this issue
Jul 24, 2023
Fix dos33.c getopt for BSAVE arguments on non-linux systems, deater#18 Also change argument usage of '<ref>' to '[optional]' to reflect that those arguments are optional, and add them to the brief usage displayed on BSAVE argument error
jquast
added a commit
to jquast/dos33fsprogs
that referenced
this issue
Jul 24, 2023
- Fix dos33.c getopt for BSAVE arguments deater#18 - tested on OSX and Debian arm64 - bugfix display of length when `-d` debug is used - update doc usage
jquast
added a commit
to jquast/dos33fsprogs
that referenced
this issue
Jul 24, 2023
- Fix dos33.c getopt for BSAVE arguments deater#18 - tested on OSX and Debian arm64 - bugfix display of length when `-d` debug is used - update doc usage
I've submitted PR #22 should fix dos33 for BSD (or Mac OSX) users while being compatible with linux, I tested both. If it is accepted I can check elsewhere, like prodos-utils as you suggest. |
jquast
added a commit
to jquast/dos33fsprogs
that referenced
this issue
Aug 16, 2023
deater#18 - tested on OSX and Debian arm64 - bugfix display of length when `-d` debug is used - small fixes to usage terms
jquast
added a commit
to jquast/dos33fsprogs
that referenced
this issue
Aug 16, 2023
deater#18 - tested on OSX and Debian arm64 - bugfix display of length when `-d` debug is used - small fixes to usage terms
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is that BSD/traditional Unixes (including Darwin/Mac OS, which impacts me), use a
getopt()
that, by default, demands that all the options be specified before any non-option arguments.So, while e.g. dos33 -h gives:
Usage: dos33 [-h] [-y] [-x] disk_image COMMAND [options]
the reality is that, on my Mac, all of the options to COMMAND must be placed before the disk_image argument in order to be recognized by
getopt()
.That is, I may not portably type:
dos33 -y MY-DISK.DSK BSAVE -a 0x6000 MYBIN
but instead:
dos33 -y -a 0x6000 MY-DISK.DSK BSAVE MYBIN
Suggested solutions:
getopt()
once for 'hyx', and then run it again after moving theargv
pointer past the disk_image and COMMAND arguments, so thatgetopt()
"sees" the following options as coming first.#define
d, or by calling a differently-namedgetopt()
routine?The text was updated successfully, but these errors were encountered: