Lines Matching full:code
132 <li>High-quality — stable and reliable code, wide
163 be easy to condition source code using <strong>ncurses</strong>
165 code.</p>
169 code can use this macro to condition in or out the code that
173 <code>NCURSES_MOUSE_VERSION</code> which XSI Curses does not
181 <p>Code written for <strong>ncurses</strong> may assume an
186 <p>We encourage (but do not require) developers to make the code
194 <li>All such code is properly conditioned so the build process
203 <p>We use GNU <code>autoconf(1)</code> as a tool to deal with
207 which you then use to condition your code.</p>
256 <code>bug-ncurses-request@gnu.org</code> with a message
259 <pre class="code-block">
262 <p>The <code>ncurses</code> code is maintained by a small group
266 If you think you have found a bug in <code>ncurses</code>, there
309 libraries. Insert a <code>trace()</code> call with the
310 argument set to <code>TRACE_UPDATE</code>. (See <a href=
321 that the bug is in your code and is your problem rather than
368 <code>curses.h</code> file.</p>
378 <p>The most important of these is <code>mvcur</code>, a test
379 frame for the cursor-movement optimization code. With this
388 <code>hashmap</code> and read the header comments of
389 <code>hardscroll.c</code> and <code>hashmap.c</code>; then try it
391 separately with <code>hardscroll</code>.</p>
401 none of this code does any I/O except through calls to more
405 <code>lib_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c
418 lib_window.c</code>
428 <code>lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c
429 lib_tracedmp.c lib_tracemse.c trace_buf.c</code>
442 <code>lib_acs.c lib_beep.c lib_color.c lib_endwin.c
445 read_entry.c.</code>
456 <code>lib_kernel.c lib_baudrate.c lib_raw.c lib_tstp.c
457 lib_twait.c</code>
462 <code>lib_print.c</code> uses sleep(2) and also falls in this
468 <code>hardscroll.c hashmap.c lib_addch.c lib_doupdate.c
470 lib_vidattr.c</code>
479 the terminfo compiler. The reason this code lives in the
484 <code>alloc_entry.c captoinfo.c comp_captab.c comp_error.c
486 read_termcap.c write_entry.c</code>
495 <p>All <code>ncurses</code> input funnels through the function
496 <code>wgetch()</code>, defined in <code>lib_getch.c</code>. This
504 <code>ungetch()</code>.</p>
506 <p>The <code>wgetch()</code> code distinguishes between function
513 <code>select(2)</code> calls may find the code in
514 <code>lib_twait.c</code> interesting. It deals with the problem
516 The function <code>timed_wait()</code> effectively simulates a
521 <p>If the mouse interface is active, <code>wgetch()</code> polls
523 input. It is up to <code>lib_mouse.c</code> how the polling is
545 <p>The <code>lib_mouse()</code> code is logically split into a
553 of two ways: either (a) <code>_nc_mouse_event()</code> detects a
554 series of incoming mouse reports and queues them, or (b) code in
555 <code>lib_getch.c</code> detects the <strong>kmous</strong>
559 <p>In either case, <code>_nc_mouse_parse()</code> should be
567 <code>wgetnstr()</code> call (which simulates cooked-mode line
572 represented in the <code>curscr</code> window structure) to the
573 desired new state (as represented in the <code>newscr</code>
577 <code>hashmap.c</code>, <code>hardscroll.c</code> and
578 <code>lib_doupdate.c</code>; the latter two use
579 <code>lib_mvcur.c</code>. Essentially, what happens looks like
584 <p>The <code>hashmap.c</code> module tries to detect vertical
590 code adds deductions made using a modified Heckel algorithm
595 <p>The <code>hardscroll.c</code> module computes an optimum
597 indices match. It calls <code>_nc_mvcur_scrolln()</code> in
598 <code>lib_mvcur.c</code> to do those motions.</p>
602 <p>Then <code>lib_doupdate.c</code> goes to work. Its job is
603 to do line-by-line transformations of <code>curscr</code>
604 lines to <code>newscr</code> lines. Its main tool is the
605 routine <code>mvcur()</code> in <code>lib_mvcur.c</code>.
614 enabling the <code>TRACE_TIMES</code> trace level causes a report
622 <code>_nc_optimize_enable</code>. See the file
623 <code>include/curses.h.in</code> for mask values, near the
633 <p>The configuration code prefers the POSIX regex facility,
637 <p>Historical note: the panels code was written primarily to
641 <code>ncurses</code>.</p>
653 dual-mode lexical analyzer (in <code>comp_scan.c</code>). The
673 <code>include/Caps</code>; these scripts actually write C
681 a matter of adding one line to the <code>include/Caps</code>
699 the startup code to translate termcap entries on the fly. The
730 that got written immediately, that is OK; the resolution code
734 The <code>write_entry()</code> code complains before overwriting
736 call to <code>write_entry()</code>, Thus it will complain about
749 <p>The translation output code (<code>dump_entry()</code> in
750 <code>ncurses/dump_entry.c</code>) is shared with the
755 <p>The <code>include/Caps</code> file has a header comment
759 plain ignore a given capability without writing any C code at
763 translation, there are functions in <code>parse_entry.c</code>
772 the same entry-dumping code used by <strong>tic</strong> for
774 code is the use of a predicate function passed in to
775 <code>dump_entry()</code> to control which capabilities are
780 just do an entry load followed by a <code>tputs()</code> of a
788 <p>The prefix <code>_nc_</code> should be used on library public
797 <p>Look for the string <code>FIXME</code> in source files to tag
801 C code. That is the job of the configuration system.</p>
803 <p>To hold down complexity, do make your code data-driven.
805 <code>include/Caps</code>, do it. If you find you need to augment
807 is still preferable to ad-hoc code — that is why the fifth
820 <code>tputs()</code> and <code>putp()</code>) and do not call any
826 <code>lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c
832 lib_unctrl.c lib_window.c panel.c</code>
838 <code>lib_getstr.c</code>
842 <code>tputs()</code> and <code>putp()</code>:</p>
845 <code>lib_beep.c lib_color.c lib_endwin.c lib_options.c
846 lib_slk.c lib_vidattr.c</code>
862 <code>alloc_entry.c captoinfo.c clear.c comp_captab.c
865 write_entry.c</code>