fix: Fixed ALL the code
This commit is contained in:
parent
03c35d5366
commit
97b7240286
10 changed files with 68 additions and 11 deletions
|
|
@ -11,18 +11,19 @@ int iob_init(struct iob_context *ctx)
|
|||
|
||||
switch (context.mode)
|
||||
{
|
||||
IOB_MODE_STDIN:
|
||||
case IOB_MODE_STDIN:
|
||||
input = stdin;
|
||||
return 0;
|
||||
|
||||
IOB_MODE_SCRIPT:
|
||||
case IOB_MODE_SCRIPT:
|
||||
if (context.args == NULL)
|
||||
return -2;
|
||||
input = fopen(context.args, "r");
|
||||
if (input == NULL)
|
||||
return -4;
|
||||
return 0;
|
||||
|
||||
IOB_MODE_CMD:
|
||||
case IOB_MODE_CMD:
|
||||
if (context.args != NULL)
|
||||
return -2;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue