~ubuntu-branches/ubuntu/raring/genius/raring

« back to all changes in this revision

Viewing changes to src/calc.c

  • Committer: Logan Rosen
  • Date: 2012-12-23 04:12:09 UTC
  • mfrom: (1.2.8)
  • Revision ID: logatronico@gmail.com-20121223041209-kduaktqblmrcakhk
New upstream release (LP: #1092569).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GENIUS Calculator
2
 
 * Copyright (C) 1997-2009 Jiri (George) Lebl
 
2
 * Copyright (C) 1997-2012 Jiri (George) Lebl
3
3
 *
4
4
 * Author: Jiri (George) Lebl
5
5
 *
1993
1993
 
1994
1994
        while ( ! break_on_next && fgets (buf, buf_size, fp) != NULL) {
1995
1995
                char *p;
1996
 
                char *b2;
 
1996
                char *b2 = NULL;
1997
1997
                GelToken *tok, *symbolic_tok = NULL;
1998
1998
                int size, nargs, vararg, propagate_mod, no_mod_all_args;
1999
1999
                int local_all, never_on_subst_list, built_subst_dict;
2589
2589
 
2590
2590
        if (strcmp (cmd, "load") == 0) {
2591
2591
                gel_output_full_string (gel_main_out,
2592
 
                                        _("Load a file into the interpretor"));
 
2592
                                        _("Load a file into the interpreter"));
2593
2593
        } else if (strcmp (cmd, "plugin") == 0) {
2594
2594
                gel_output_full_string (gel_main_out,
2595
2595
                                        _("Load a plugin"));
2726
2726
                                   NULL /* help_html */ };
2727
2727
        GelEFunc *f;
2728
2728
        int i;
 
2729
        gboolean documented_or_func_or_param = TRUE;
2729
2730
 
2730
2731
        gel_output_push_nonotify (gel_main_out);
2731
2732
 
2762
2763
                return;
2763
2764
        }
2764
2765
 
2765
 
        do_cyan ();
2766
2766
 
2767
2767
        f = d_lookup_global (d_intern (text));
2768
2768
 
 
2769
        if (f == NULL &&
 
2770
            help == &not_documented &&
 
2771
            ! d_intern (text)->parameter) {
 
2772
                documented_or_func_or_param = FALSE;
 
2773
        }
 
2774
 
 
2775
        if (documented_or_func_or_param)
 
2776
                do_cyan ();
 
2777
 
2769
2778
        if (d_intern (text)->parameter) {
2770
2779
                gel_output_printf_full (gel_main_out, FALSE, "%s%s\n",
2771
2780
                                        _("Parameter: "), text);
2773
2782
                   || (f->type == GEL_BUILTIN_FUNC &&
2774
2783
                       f->named_args == NULL &&
2775
2784
                       ! f->vararg)) {
2776
 
                gel_output_printf_full (gel_main_out, FALSE, "%s\n", text);
 
2785
                if (documented_or_func_or_param)
 
2786
                        gel_output_printf_full (gel_main_out, FALSE, "%s\n", text);
2777
2787
        } else {
2778
2788
                GSList *li;
2779
2789
                gel_output_printf_full (gel_main_out, FALSE, "%s (", text);
2789
2799
                        gel_output_full_string (gel_main_out, "...");
2790
2800
                gel_output_full_string (gel_main_out, ")\n");
2791
2801
        }
2792
 
        do_green ();
 
2802
        if (documented_or_func_or_param)
 
2803
                do_green ();
2793
2804
 
2794
2805
        if (help->aliases != NULL) {
2795
2806
                GSList *li;
2803
2814
                g_string_free (gs, TRUE);
2804
2815
        }
2805
2816
 
2806
 
        if (help->description != NULL) {
 
2817
        if (documented_or_func_or_param && help->description != NULL) {
2807
2818
                gel_output_printf_full (gel_main_out, FALSE,
2808
2819
                                        _("Description: %s\n"),
2809
2820
                                        _(help->description));