~darkxst/ubuntu/trusty/gjs/1.38.1

« back to all changes in this revision

Viewing changes to gjs/console.c

  • Committer: Tim Lunn
  • Date: 2013-10-23 00:07:11 UTC
  • mto: This revision was merged to the branch mainline in revision 68.
  • Revision ID: tim@feathertop.org-20131023000711-adrufeum4ov2tiif
Tags: upstream-1.38.1
ImportĀ upstreamĀ versionĀ 1.38.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        source_js_version = gjs_context_scan_buffer_for_js_version(script, 1024);
75
75
        len = strlen(script);
76
76
        filename = "<command line>";
77
 
        program_name = NULL;
 
77
        program_name = argv[0];
78
78
    } else if (argc <= 1) {
79
79
        source_js_version = NULL;
80
80
        script = g_strdup("const Console = imports.console; Console.interact();");
81
81
        len = strlen(script);
82
82
        filename = "<stdin>";
83
 
        program_name = NULL;
 
83
        program_name = argv[0];
84
84
    } else /*if (argc >= 2)*/ {
85
85
        error = NULL;
86
86
        if (!g_file_get_contents(argv[1], &script, &len, &error)) {