Welcome, Guest. Please login or register.

Author Topic: Using Execute() in C.  (Read 3097 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Noster

  • Sr. Member
  • ****
  • Join Date: Jan 2004
  • Posts: 375
    • Show all replies
Re: Using Execute() in C.
« on: March 24, 2004, 09:19:03 AM »
Hi

@Sidewinder

There might be a little difference in the command as passed via the CLI and the one passed to Execute() in your app:

The line of the CLI command is terminated by a linefeed! You might enlarge your command-buffer "command" by one and add a "strcat(command, "\n")" to your code.
Maybe this works.

Noster
DON\\\'T PANIC
    Douglas Adams - Hitch Hiker\\\'s Guide to the Galaxis
 

Offline Noster

  • Sr. Member
  • ****
  • Join Date: Jan 2004
  • Posts: 375
    • Show all replies
Re: Using Execute() in C.
« Reply #1 on: March 25, 2004, 08:42:22 AM »
Hi

Ok, I've seen the failure has been found so this thread is dead ;-)

@Piru

> No, the command need not be newline terminated for Execute().

Of cause, I know that Execute() doesn't requires a newline terminated command string, but I've thought: "Who knows how PhxAss parses its arguments ?"
Bad written programs may not use the C-style argument parsing or the AmigaDOS ReadArgs() command for parsing their arguments, instead looking for a terminating linefeed to find the end of the command line.

Noster
DON\\\'T PANIC
    Douglas Adams - Hitch Hiker\\\'s Guide to the Galaxis