mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-15 08:12:46 +02:00
Fix stupid GNU getopt behaviour.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-generic.c,v 1.12 2008-06-29 07:04:30 nicm Exp $ */
|
||||
/* $Id: cmd-generic.c,v 1.13 2008-09-25 23:28:12 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -44,7 +44,7 @@ cmd_target_parse(struct cmd *self, int argc, char **argv, char **cause)
|
||||
cmd_target_init(self, 0);
|
||||
data = self->data;
|
||||
|
||||
while ((opt = getopt(argc, argv, "dkt:")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, GETOPT_PREFIX "dkt:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'd':
|
||||
if (self->entry->flags & CMD_DFLAG) {
|
||||
@ -166,7 +166,7 @@ cmd_srcdst_parse(struct cmd *self, int argc, char **argv, char **cause)
|
||||
cmd_srcdst_init(self, 0);
|
||||
data = self->data;
|
||||
|
||||
while ((opt = getopt(argc, argv, "dks:t:")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, GETOPT_PREFIX "dks:t:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'd':
|
||||
if (self->entry->flags & CMD_DFLAG) {
|
||||
@ -299,7 +299,7 @@ cmd_buffer_parse(struct cmd *self, int argc, char **argv, char **cause)
|
||||
cmd_buffer_init(self, 0);
|
||||
data = self->data;
|
||||
|
||||
while ((opt = getopt(argc, argv, "b:dkt:")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, GETOPT_PREFIX "b:dkt:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'b':
|
||||
if (data->buffer == -1) {
|
||||
|
Reference in New Issue
Block a user