X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_setup.c;h=db93a368fda162022a48dda6edda2468e41140f7;hb=1c305869cc1b9454efa9325fb5a44b18c79ce91b;hp=434d5633a7dcb8388e8eceb43b82c1b233c0d4b0;hpb=461e72d1826483cb2c2cb243412f2dc5b00b2b1a;p=ncurses.git diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 434d5633..db93a368 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -49,7 +49,7 @@ #include #endif -MODULE_ID("$Id: lib_setup.c,v 1.215 2021/11/20 23:11:31 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.218 2022/08/13 18:12:22 tom Exp $") /**************************************************************************** * @@ -831,7 +831,7 @@ TINFO_SETUP_TERM(TERMINAL **tp, if (NC_ISATTY(Filedes)) { NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG); NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG); - baudrate(); + NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); } code = OK; #endif @@ -908,6 +908,7 @@ _nc_forget_prescr(void) { PRESCREEN_LIST *p, *q; pthread_t id = GetThreadID(); + _nc_lock_global(screen); for (p = _nc_prescreen.allocated, q = 0; p != 0; q = p, p = p->next) { if (p->id == id) { if (q) { @@ -919,6 +920,7 @@ _nc_forget_prescr(void) break; } } + _nc_unlock_global(screen); } #endif /* USE_PTHREADS */ @@ -990,6 +992,7 @@ _nc_setupterm(const char *tname, int rc = ERR; TERMINAL *termp = 0; + _nc_init_pthreads(); _nc_lock_global(prescreen); START_TRACE(); if (TINFO_SETUP_TERM(&termp, tname, Filedes, errret, reuse) == OK) { @@ -999,6 +1002,7 @@ _nc_setupterm(const char *tname, } } _nc_unlock_global(prescreen); + return rc; } #endif