~ubuntu-branches/ubuntu/trusty/lifelines/trusty

« back to all changes in this revision

Viewing changes to src/liflines/screen.c

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Augusto van de Wiel (faw)
  • Date: 2007-05-23 23:49:53 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20070523234953-ogno9rnbmth61i7p
Tags: 3.0.50-2etch1
* Changing docs/ll-reportmanual.xml and docs/ll-userguide.xml to fix
  documentation build problems (Closes: #418347).

* lifelines-reports
  - Adding a dependency to lifelines >= 3.0.50 to prevent file conflict.
    (Closes: #405500).

* Updating French translation. Thanks to Bernard Adrian. (Closes: #356671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 * Copyright(c) 1992-96 by T.T. Wetmore IV; all rights reserved
27
27
 *===========================================================*/
28
28
 
 
29
#include <time.h>
29
30
#include "llstdlib.h"
30
31
#ifdef HAVE_LOCALE_H
31
32
#include <locale.h>
45
46
#include "iconvshim.h"
46
47
#endif
47
48
#include "codesets.h"
 
49
#include "charprops.h"
48
50
 
49
51
#define LINESREQ 24
50
52
#define COLSREQ  80
117
119
extern STRING qShitkey;
118
120
 
119
121
extern STRING qSmn_add_ttl,qSmn_add_indi,qSmn_add_fam,qSmn_add_chil,qSmn_add_spou;
120
 
extern STRING qSmn_del_ttl,qSmn_del_chil,qSmn_del_spou,qSmn_del_indi,qSmn_del_fam;
 
122
extern STRING qSmn_del_ttl,qSmn_del_chil,qSmn_del_spou;
 
123
extern STRING qSmn_del_indi,qSmn_del_fam,qSmn_del_any;
121
124
extern STRING qSmn_sca_ttl,qSmn_sca_nmfu,qSmn_sca_nmfr,qSmn_sca_refn;
122
125
extern STRING qSmn_sea_ttl,qSmn_sea_vhis,qSmn_sea_vhi2,qSmn_sea_vhix;
123
126
extern STRING qSmn_sea_chis,qSmn_sea_chi2,qSmn_sea_chix,qSmn_sea_scan;
202
205
static RECORD invoke_add_menu(void);
203
206
static void invoke_cset_display(void);
204
207
static void invoke_del_menu(void);
205
 
static INT invoke_extra_menu(void);
 
208
static INT invoke_extra_menu(RECORD *rec);
206
209
static RECORD invoke_search_menu(void);
207
210
static RECORD invoke_fullscan_menu(void);
208
211
static void invoke_utils_menu(void);
276
279
static llchtype gr_hline='-', gr_vline= '|';
277
280
static llchtype gr_llx='*', gr_lrx='*', gr_ulx='*', gr_urx='*';
278
281
 
 
282
static int ui_time_elapsed = 0; /* total time waiting for user input */
 
283
 
279
284
/*********************************************
280
285
 * local & exported function definitions
281
286
 * body of module
365
370
        wborder(win, gr_vline, gr_vline, gr_hline, gr_hline, gr_ulx, gr_urx, gr_llx, gr_lrx);
366
371
}
367
372
/*=======================================
368
 
 * repaint_main_menu --
 
373
 * repaint_main_menu -- Display choices for main menu
 
374
 *  See function main_menu for actions
369
375
 *=====================================*/
370
376
static void
371
377
repaint_main_menu (UIWINDOW uiwin)
385
391
        llstrncpyf(title, width, uu8, _(qSmtitle), get_lifelines_version(ll_cols-4));
386
392
        mvccwaddstr(win, 1, 2, title);
387
393
        mvccwaddstr(win, 2, 4, _(qScright));
388
 
        str = getoptint("FullDbPath", 1) ? readpath : readpath_file;
 
394
        str = getlloptint("FullDbPath", 1) ? readpath : readpath_file;
389
395
        mvccwprintw(win, 3, 4, _(qSdbname), str);
390
396
        if (immutable)
391
397
                wprintw(win, _(qSdbimmut));
675
681
        case 't': edit_tt_menu(); break;
676
682
        case 'u': invoke_utils_menu(); break;
677
683
        case 'x': 
678
 
                c = invoke_extra_menu();
679
 
                if (c != BROWSE_QUIT)
680
 
                        main_browse(NULL, c);
 
684
                {
 
685
                        RECORD rec=0;
 
686
                        c = invoke_extra_menu(&rec);
 
687
                        if (c != BROWSE_QUIT)
 
688
                                main_browse(rec, c);
 
689
                        /* main_browse consumed rec */
 
690
                }
681
691
                break;
682
692
        case 'q': alldone = 1; break;
683
693
        case 'Q': 
966
976
 *  prmpt: [IN]  prompt of question (2nd line)
967
977
 *====================================*/
968
978
BOOLEAN
969
 
ask_for_db_filename (STRING ttl, STRING prmpt, STRING basedir, STRING buffer, INT buflen)
 
979
ask_for_db_filename (CNSTRING ttl, CNSTRING prmpt, CNSTRING basedir, STRING buffer, INT buflen)
970
980
{
971
981
        basedir=basedir; /* unused */
972
982
        /* This could have a list of existing ones like askprogram.c */
1042
1052
 *  buflen:  [IN]  max size of response
1043
1053
 *====================================*/
1044
1054
BOOLEAN
1045
 
ask_for_string (STRING ttl, STRING prmpt, STRING buffer, INT buflen)
 
1055
ask_for_string (CNSTRING ttl, CNSTRING prmpt, STRING buffer, INT buflen)
1046
1056
{
1047
1057
        UIWINDOW uiwin = ask_win;
1048
1058
        WINDOW *win = uiw_win(uiwin);
1067
1077
 *  buflen:  [IN]  max size of response
1068
1078
 *====================================*/
1069
1079
BOOLEAN
1070
 
ask_for_string2 (STRING ttl1, STRING ttl2, STRING prmpt, STRING buffer, INT buflen)
 
1080
ask_for_string2 (CNSTRING ttl1, CNSTRING ttl2, CNSTRING prmpt, STRING buffer, INT buflen)
1071
1081
{
1072
1082
        UIWINDOW uiwin = ask_msg_win;
1073
1083
        WINDOW *win = uiw_win(uiwin);
1190
1200
        STRING * array=0;
1191
1201
        STRING choice=0;
1192
1202
        INT i=0, rtn=-1;
1193
 
        INT len = llen(list);
 
1203
        INT len = length_list(list);
1194
1204
 
1195
1205
        if (len < 1) return -1;
1196
1206
        if (!ttl) ttl=_(qSdefttl);
1268
1278
 *  @code:     [IN]  command to process
1269
1279
 * Returns -1 if resized window, 1 if handled, 0 if unhandled.
1270
1280
 *===========================================================*/
1271
 
static BOOLEAN
 
1281
static INT
1272
1282
handle_list_cmds (listdisp * ld, INT code)
1273
1283
{
1274
1284
        INT rows = ld->rectList.bottom - ld->rectList.top + 1;
1727
1737
}
1728
1738
/*============================
1729
1739
 * invoke_add_menu -- Handle add menu
 
1740
 * returns addref'd record
1730
1741
 *==========================*/
1731
1742
static RECORD
1732
1743
invoke_add_menu (void)
1753
1764
        case 'p':
1754
1765
                rec = add_indi_by_edit(&disp_long_rfmt);
1755
1766
                break;
1756
 
        case 'f': add_family(NULL, NULL, NULL); break;
 
1767
        case 'f': add_family_by_edit(NULL, NULL, NULL, &disp_long_rfmt); break;
1757
1768
        case 'c': my_prompt_add_child(NULL, NULL); break;
1758
1769
        case 's': prompt_add_spouse(NULL, NULL, TRUE); break;
1759
1770
        case 'q': break;
1770
1781
        UIWINDOW uiwin=0;
1771
1782
        WINDOW * win=0;
1772
1783
        if (!del_menu_win) {
1773
 
                del_menu_win = create_newwin2("del_menu", 8, 66);
 
1784
                del_menu_win = create_newwin2("del_menu", 9, 66);
1774
1785
                /* paint it for the first & only time (it's static) */
1775
1786
                repaint_delete_menu(del_menu_win);
1776
1787
        }
1779
1790
 
1780
1791
        activate_uiwin(uiwin);
1781
1792
        wmove(win, 1, 30);
1782
 
        code = interact(uiwin, "csifq", -1);
 
1793
        code = interact(uiwin, "csifoq", -1);
1783
1794
        deactivate_uiwin_and_touch_all();
1784
1795
 
1785
1796
        switch (code) {
1786
1797
        case 'c': choose_and_remove_child(NULL, NULL, FALSE); break;
1787
1798
        case 's': choose_and_remove_spouse(NULL, NULL, FALSE); break;
1788
 
        case 'i': delete_indi(NULL, TRUE); break;
 
1799
        case 'i': choose_and_remove_indi(NULL, DOCONFIRM); break;
1789
1800
        case 'f': choose_and_remove_family(); break;
 
1801
        case 'o': choose_and_remove_any_record(NULL, DOCONFIRM); break;
1790
1802
        case 'q': break;
1791
1803
        }
1792
1804
}
1801
1813
 
1802
1814
        zs_setf(zstr, "%s: %s", _("Internal codeset"), int_codeset);
1803
1815
        enqueue_list(list, strsave(zs_str(zstr)));
 
1816
        if (uu8) {
 
1817
                enqueue_list(list, strsave(_("Internal UTF-8: Yes")));
 
1818
        } else {
 
1819
                enqueue_list(list, strsave(_("Internal UTF-8: No")));
 
1820
        }
1804
1821
 
1805
1822
        if (are_locales_supported())
1806
1823
                enqueue_list(list, strsave(_("Locales are enabled.")));
1808
1825
                enqueue_list(list, strsave(_("Locales are disabled.")));
1809
1826
        
1810
1827
        if (is_nls_supported()) {
1811
 
                enqueue_list(list, strsave(_("NLS (National Language Support) is enabled.")));
1812
 
                zs_setf(zstr, "LOCALEDIR: %s", LOCALEDIR);
 
1828
                enqueue_list(list, strsave(_("NLS (National Language Support) is compiled in.")));
 
1829
                zs_setf(zstr, "LocaleDir (default): %s", LOCALEDIR);
1813
1830
                enqueue_list(list, strsave(zs_str(zstr)));
1814
 
                zs_setf(zstr,  "LocaleDir: %s", getoptstr("LocaleDir", ""));
 
1831
                zs_setf(zstr,  "LocaleDir (override): %s", getlloptstr("LocaleDir", ""));
1815
1832
                enqueue_list(list, strsave(zs_str(zstr)));
1816
1833
        } else {
1817
 
                enqueue_list(list, strsave(_("NLS (National Language Support) is disabled.")));
 
1834
                enqueue_list(list, strsave(_("NLS (National Language Support) is not compiled in.")));
 
1835
        }
 
1836
 
 
1837
        if (1) {
 
1838
                CNSTRING str = get_gettext_codeset();
 
1839
                str = str ? str : "";
 
1840
                zs_setf(zstr, "bind_textdomain_codeset: %s", str);
 
1841
                enqueue_list(list, strsave(zs_str(zstr)));
1818
1842
        }
1819
1843
 
1820
1844
        add_shims_info(list);
1821
1845
 
1822
1846
        if (is_iconv_supported())
1823
 
                enqueue_list(list, strsave(_("iconv (codeset conversion) is enabled.")));
 
1847
                enqueue_list(list, strsave(_("iconv (codeset conversion) is compiled in.")));
1824
1848
        else
1825
 
                enqueue_list(list, strsave(_("iconv (codeset conversion) is disabled.")));
 
1849
                enqueue_list(list, strsave(_("iconv (codeset conversion) is not compiled in.")));
1826
1850
        
1827
1851
        zs_setf(zstr, _("Startup collate locale: %s"), get_original_locale_collate());
1828
1852
        enqueue_list(list, strsave(zs_str(zstr)));
1879
1903
                enqueue_list(list, strsave(zs_str(zstr)));
1880
1904
        }
1881
1905
 
1882
 
        zs_setf(zstr, "TTPATH: %s", getoptstr("TTPATH", "."));
 
1906
        zs_setf(zstr, "TTPATH: %s", getlloptstr("TTPATH", "."));
1883
1907
        enqueue_list(list, strsave(zs_str(zstr)));
1884
1908
 
 
1909
        if (charprops_is_loaded()) {
 
1910
                enqueue_list(list, strsave(_("UTF-8 charprops loaded" )));
 
1911
        } else {
 
1912
                enqueue_list(list, strsave(_("UTF-8 charprops not loaded" )));
 
1913
        }
 
1914
 
 
1915
 
1885
1916
        display_list(_("Codeset information"), list);
1886
 
        make_list_empty(list);
1887
 
        remove_list(list, 0);
 
1917
        destroy_list(list);
1888
1918
        zs_free(&zstr);
1889
1919
}
1890
1920
/*======================================
2019
2049
        }
2020
2050
 
2021
2051
        /* Ask whence to load it */
2022
 
        ttimportdir = getoptstr("TTPATH", ".");
 
2052
        ttimportdir = getlloptstr("TTPATH", ".");
2023
2053
        fp = ask_for_input_file(LLREADTEXT, _(qSmintt), &fname, ttimportdir, ".tt");
2024
2054
        if (fp) {
2025
2055
                fclose(fp);
2053
2083
                return;
2054
2084
        }
2055
2085
        /* Ask whither to save it */
2056
 
        ttexportdir = getoptstr("LLTTEXPORT", ".");
 
2086
        ttexportdir = getlloptstr("LLTTEXPORT", ".");
2057
2087
        fp = ask_for_output_file(LLWRITETEXT, _(qSmouttt), &fname, ttexportdir, ".tt");
2058
2088
        if (fp) {
2059
2089
                fclose(fp);
2140
2170
 * invoke_extra_menu -- Handle extra menu
2141
2171
 *==============================*/
2142
2172
static INT
2143
 
invoke_extra_menu (void)
 
2173
invoke_extra_menu (RECORD *prec)
2144
2174
{
2145
2175
        INT code;
2146
2176
        UIWINDOW uiwin=0;
2155
2185
        win = uiw_win(uiwin);
2156
2186
 
2157
2187
        while (1) {
 
2188
 
2158
2189
                activate_uiwin(uiwin);
2159
2190
                wmove(win, 1, strlen(_(qSmn_xttl))+3);
2160
2191
                code = interact(uiwin, "sex123456q", -1);
2164
2195
                case 's': return BROWSE_SOUR;
2165
2196
                case 'e': return BROWSE_EVEN;
2166
2197
                case 'x': return BROWSE_AUX;
2167
 
                case '1': edit_add_source(); return BROWSE_QUIT;
2168
 
                case '2': edit_source(NULL, &disp_long_rfmt); return BROWSE_QUIT;;
2169
 
                case '3': edit_add_event(); return BROWSE_QUIT;;
2170
 
                case '4': edit_event(NULL, &disp_long_rfmt); return BROWSE_QUIT;;
2171
 
                case '5': edit_add_other(); return BROWSE_QUIT;;
2172
 
                case '6': edit_other(NULL, &disp_long_rfmt); return BROWSE_QUIT;;
2173
 
                case 'q': return BROWSE_QUIT;;
 
2198
                case '1': *prec = edit_add_source(); return BROWSE_SOUR;
 
2199
                case '2': edit_source(NULL, &disp_long_rfmt); return BROWSE_QUIT;
 
2200
                case '3': *prec = edit_add_event(); return BROWSE_EVEN;
 
2201
                case '4': edit_event(NULL, &disp_long_rfmt); return BROWSE_QUIT;
 
2202
                case '5': *prec = edit_add_other(); return BROWSE_AUX;
 
2203
                case '6': edit_other(NULL, &disp_long_rfmt); return BROWSE_QUIT;
 
2204
                case 'q': return BROWSE_QUIT;
2174
2205
                }
2175
2206
        }
2176
2207
}
2179
2210
 *  returns descriptive string for failure, 0 for pass
2180
2211
 *=============================*/
2181
2212
static STRING
2182
 
uopt_validate (TABLE tab)
 
2213
uopt_validate (TABLE tab, void * param)
2183
2214
{
2184
2215
        STRING codeset = valueof_str(tab, "codeset");
 
2216
        STRING original_codeset = (STRING)param;
2185
2217
        /*
2186
2218
        our only rule currently is that user may not change codeset
2187
2219
        of a populated database
2188
2220
        */
2189
 
        if (!eqstr_ex(codeset, int_codeset)) {
 
2221
        if (!eqstr_ex(codeset, original_codeset)
 
2222
                && !eqstr_ex(codeset, int_codeset)) {
2190
2223
                if (num_indis()+num_fams()+num_sours()+num_evens()+num_othrs())
2191
2224
                        return _("Impermissible to change codeset in a populated database");
2192
2225
        }
2198
2231
static void
2199
2232
edit_place_table (void)
2200
2233
{
2201
 
        edit_valtab_from_db("VPLAC", &placabbvs, ':', _(qSabverr), 0);
 
2234
        edit_valtab_from_db("VPLAC", &placabbvs, ':', _(qSabverr), 0, 0);
2202
2235
}
2203
2236
/*===============================
2204
2237
 * edit_user_options -- Allow user to edit options embedded in current db
2206
2239
static void
2207
2240
edit_user_options (void)
2208
2241
{
2209
 
        TABLE uopts = create_table(FREEBOTH);
 
2242
        TABLE uopts = create_table_str();
 
2243
        STRING param=0;
2210
2244
        get_db_options(uopts);
2211
 
        if (edit_valtab_from_db("VUOPT", &uopts, '=', _(qSuoperr), uopt_validate))
 
2245
        param = valueof_str(uopts, "codeset");
 
2246
        param = (param ? strsave(param) : 0);
 
2247
 
 
2248
        if (edit_valtab_from_db("VUOPT", &uopts, '=', _(qSuoperr), uopt_validate, (void *)param))
2212
2249
                set_db_options(uopts);
2213
 
        destroy_table(uopts);
 
2250
        strfree(&param);
 
2251
        release_table(uopts);
2214
2252
}
2215
2253
/*===============================
2216
2254
 * translate_hdware_key -- 
2268
2306
        INT offset=0;
2269
2307
        INT cmdnum;
2270
2308
        INT c, i, n = str ? strlen(str) : 0;
2271
 
        while (TRUE) {
 
2309
 
 
2310
        /* Menu Loop */
 
2311
        while (TRUE)
 
2312
        {
 
2313
                INT time_start=time(NULL);
2272
2314
                crmode();
2273
2315
                keypad(uiw_win(uiwin),1);
2274
2316
                c = wgetch(uiw_win(uiwin));
 
2317
                ui_time_elapsed += time(NULL) - time_start;
2275
2318
                if (c == EOF) c = 'q';
2276
2319
                nocrmode();
2277
2320
                if (!progrunning && !lock_std_msg) {
2302
2345
                                buffer[1] = 0;
2303
2346
                                offset = 1;
2304
2347
                        }
 
2348
 
 
2349
                        /* Get Menu Command */
2305
2350
                        cmdnum = menuset_check_cmd(get_screen_menuset(screen), buffer);
2306
 
                        if (cmdnum != CMD_NONE && cmdnum != CMD_PARTIAL)
 
2351
 
 
2352
                        /* Act On Menu Command */
 
2353
                        if (cmdnum != CMD_NONE && cmdnum != CMD_PARTIAL) {
2307
2354
                                return cmdnum;
 
2355
                        }
2308
2356
                        if (cmdnum != CMD_PARTIAL) {
2309
2357
                                msg_error(_(qSmn_unkcmd));
2310
2358
                                offset = 0;
2477
2525
        WINDOW *win = uiw_win(uiwin);
2478
2526
        INT i, j, row, len = length_indiseq(seq);
2479
2527
        STRING key, name;
2480
 
        NODE indi;
 
2528
        NODE recnode=0;
2481
2529
        char scratch[200];
2482
2530
        INT mode = 'n';
2483
2531
        INT viewlines = 13;
2490
2538
        row = LIST_LINES+2;
2491
2539
        for (i = top, j = 0; j < viewlines && i < len; i++, j++) {
2492
2540
                element_indiseq(seq, i, &key, &name);
2493
 
                indi = key_to_indi(key);
 
2541
                recnode = key_to_type(key, 0);
2494
2542
                if (i == 0 && scrollable) mvwaddch(win, row, 1, '^');
2495
2543
                if (i == len-1 && scrollable) mvwaddch(win, row, 1, '$');
2496
2544
                if (i == mark) mvwaddch(win, row, 2, 'x');
2508
2556
                }
2509
2557
                scratch[0] =0;
2510
2558
                if (name) {
2511
 
                        name = manip_name(name, DOSURCAP, REGORDER, 40);
 
2559
                        SURCAPTYPE surcaptype = DOSURCAP;
 
2560
                        if (!getlloptint("UppercaseSurnames", 1))
 
2561
                                surcaptype = NOSURCAP;
 
2562
                        name = manip_name(name, surcaptype, REGORDER, 40);
2512
2563
                        llstrapps(scratch, sizeof(scratch), uu8, name);
2513
2564
                        llstrapps(scratch, sizeof(scratch), uu8, " ");
2514
2565
                }
2515
 
                if(getoptint("DisplayKeyTags", 0) > 0) {
2516
 
                        llstrappf(scratch, sizeof(scratch), uu8, "(i%s)", key_of_record(indi));
 
2566
                if(getlloptint("DisplayKeyTags", 0) > 0) {
 
2567
                        llstrappf(scratch, sizeof(scratch), uu8, "(i%s)", key_of_record(recnode));
2517
2568
                } else {
2518
 
                        llstrappf(scratch, sizeof(scratch), uu8, "(%s)", key_of_record(indi));
 
2569
                        llstrappf(scratch, sizeof(scratch), uu8, "(%s)", key_of_record(recnode));
2519
2570
                }
2520
2571
                mvccwaddstr(win, row, 4, scratch);
2521
2572
                row++;
2730
2781
                }
2731
2782
                if (ret == 0) { /* not handled yet */
2732
2783
                        switch(code) {
2733
 
                        case 'i':
 
2784
                        case 'i': /* select current item */
 
2785
                        case CMD_KY_ENTER:
2734
2786
                                if (selectable) {
2735
2787
                                        done=TRUE;
2736
2788
                                }
2921
2973
static void
2922
2974
place_cursor_main (void)
2923
2975
{
2924
 
        INT row, col = 30;
2925
 
 
 
2976
        INT row=0, col = 30;
 
2977
        DYNMENU dynmenu = get_screen_dynmenu(cur_screen);
 
2978
 
 
2979
        /* Hide/Display Cursor */
 
2980
        if (dynmenu && dynmenu->hidden) {
 
2981
                curs_set(0);
 
2982
        } else {
 
2983
                curs_set(1);
 
2984
        }
 
2985
 
 
2986
        /* Position Cursor */
2926
2987
        switch (cur_screen) {
2927
2988
        case MAIN_SCREEN:    
 
2989
                row = 5;
2928
2990
                col = strlen(_(qSplschs))+3;
2929
 
                row = 5;
2930
2991
                break;
2931
2992
        case LIST_SCREEN:
2932
2993
                row = LIST_LINES+2;
2942
3003
                        all use dynamic menus, and the cursor position in dynamic
2943
3004
                        menus is controlled by the dynamic menu, because cursor
2944
3005
                        moves up & down with dynamic menu */
2945
 
                        DYNMENU dynmenu = get_screen_dynmenu(cur_screen);
2946
3006
                        if (dynmenu->hidden) {
2947
 
                                /* when dynamic menu hidden, show cursor 
2948
 
                                at bottom after title */
2949
 
                                STRING title = get_screen_title(cur_screen);
2950
 
                                row = ll_lines-2;
2951
 
                                col = strlen(title)+3;
 
3007
                                /* no need to position cursor */
2952
3008
                        } else {
2953
3009
                                row = dynmenu->cur_y;
2954
3010
                                col = dynmenu->cur_x;
2992
3048
        system(editstr);
2993
3049
#endif
2994
3050
        clearok(curscr, 1);
 
3051
        place_cursor_main();
2995
3052
        wrefresh(curscr);
2996
3053
        noecho();
2997
3054
}
3150
3207
clear_hseg (WINDOW *win, INT row, INT x1, INT x2)
3151
3208
{
3152
3209
        /* workaround for curses bug with spacs */
3153
 
        if (getoptint("ForceScreenErase", 0) > 0) {
 
3210
        if (getlloptint("ForceScreenErase", 0) > 0) {
3154
3211
                /* fill virtual output with dots */
3155
3212
                color_hseg(win, row, x1, x2, '_');
3156
3213
                wnoutrefresh(win);
3330
3387
append_to_msg_list (STRING msg)
3331
3388
{
3332
3389
                if (!msg_list)
3333
 
                        msg_list = create_list();
 
3390
                        msg_list = create_list2(LISTDOFREE);
3334
3391
                enqueue_list(msg_list, strsave(msg));
3335
3392
}
3336
3393
/*=========================================
3373
3430
clear_msgs (void)
3374
3431
{
3375
3432
        if (msg_list) {
3376
 
                free_string_list(msg_list);
 
3433
                destroy_list(msg_list);
3377
3434
                msg_list = 0;
3378
3435
        }
3379
3436
        msg_flag = FALSE;
3429
3486
        mvccwaddstr(win, row++, 4, _(qSmn_del_spou));
3430
3487
        mvccwaddstr(win, row++, 4, _(qSmn_del_indi));
3431
3488
        mvccwaddstr(win, row++, 4, _(qSmn_del_fam));
 
3489
        mvccwaddstr(win, row++, 4, _(qSmn_del_any));
3432
3490
        mvccwaddstr(win, row++, 4, _(qSmn_ret));
3433
3491
}
3434
3492
/*=====================================
3691
3749
{
3692
3750
        WINDOW * win = uiw_win(uiwin);
3693
3751
        /* workaround for curses bug with spaces */
3694
 
        if (getoptint("ForceScreenErase", 0) > 0) {
 
3752
        if (getlloptint("ForceScreenErase", 0) > 0) {
3695
3753
                /*
3696
3754
                To fix the dirty output on a redhat 6 system
3697
3755
                (with ncurses-5.2-8), required the call to
3736
3794
                color_hseg(win, i, rect->left, rect->right, ch);
3737
3795
        }
3738
3796
}
 
3797
/*============================
 
3798
 * get_uitime -- return cumulative elapsed time waiting 
 
3799
 *  for user input (since start of program)
 
3800
 *==========================*/
 
3801
int
 
3802
get_uitime (void)
 
3803
{
 
3804
        return ui_time_elapsed;
 
3805
}
 
3806