Skip to content

Add help flag and usage to UNIX Jerry standalone. #1000

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

Merged
merged 1 commit into from
Apr 11, 2016

Conversation

dbatyai
Copy link
Member

@dbatyai dbatyai commented Apr 11, 2016

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu

@LaszloLango LaszloLango added the enhancement An improvement label Apr 11, 2016
static void
print_usage ()
{
printf ("Usage: ./jerry [flags] [js-file ...]\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use argv[0] instead of ./jerry, IMHO.

@dbatyai
Copy link
Member Author

dbatyai commented Apr 11, 2016

@akiss77, I've updated the patch, the format now falls more in line with other tools.

{
save_snapshot_file_name_p = argv[i];
}
else
{
JERRY_ERROR_MSG ("Error: wrong format of the arguments\n");
JERRY_ERROR_MSG ("Error: no file specified for %s\n", argv[i-1]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my bad. We are using spaces around operators. So, it's i - 1. (I know, I was the one who wrote i-1 in the review. Sorry :( )

@akosthekiss
Copy link
Member

Even though I might seem picky (which I know I am), I think that the patch is improving in the right direction. And it is needed.

@dbatyai dbatyai force-pushed the add_help_flag branch 2 times, most recently from 9d516ea to 0b66854 Compare April 11, 2016 12:36
@dbatyai
Copy link
Member Author

dbatyai commented Apr 11, 2016

It's okay to be picky :). Updated again.

@akosthekiss
Copy link
Member

Thanks for the rewrites. Now: LGTM (FWIW)

@LaszloLango
Copy link
Contributor

LGTM

@akosthekiss
Copy link
Member

(Please, rebase to current master)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
@dbatyai
Copy link
Member Author

dbatyai commented Apr 11, 2016

@akiss77, Done.

@akosthekiss akosthekiss merged commit 1ae05ed into jerryscript-project:master Apr 11, 2016
@zherczeg
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants