Changeset b2b0773 for viewwin.c


Ignore:
Timestamp:
Jun 9, 2003, 10:54:18 AM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
6bf73ce
Parents:
d559df9
Message:
Changes to help build on OSX
File:
1 edited

Legend:

Unmodified
Added
Removed
  • viewwin.c

    r3a2daac rb2b0773  
    66#define BOTTOM_OFFSET 1
    77
    8 void owl_viewwin_init_text(owl_viewwin *v, WINDOW *win, int winlines, int wincols, char *text) {
    9   /* initialize the viewwin e.
    10    * 'win' is an already initialzed curses window that will be used by viewwin
    11    */
    12 
     8/* initialize the viewwin e.  'win' is an already initialzed curses
     9 * window that will be used by viewwin
     10 */
     11void owl_viewwin_init_text(owl_viewwin *v, WINDOW *win, int winlines, int wincols, char *text)
     12{
    1313  owl_fmtext_init_null(&(v->fmtext));
    1414  if (text) {
     
    2626}
    2727
    28 void owl_viewwin_init_fmtext(owl_viewwin *v, WINDOW *win, int winlines, int wincols, owl_fmtext *fmtext) {
    29   /* initialize the viewwin e.
    30    * 'win' is an already initialzed curses window that will be used by viewwin
    31    */
    32 
     28/* initialize the viewwin e.  'win' is an already initialzed curses
     29 * window that will be used by viewwin
     30 */
     31void owl_viewwin_init_fmtext(owl_viewwin *v, WINDOW *win, int winlines, int wincols, owl_fmtext *fmtext)
     32{
    3333  owl_fmtext_copy(&(v->fmtext), fmtext);
    3434  v->textlines=owl_fmtext_num_lines(&(v->fmtext));
     
    4040}
    4141
    42 void owl_viewwin_set_curswin(owl_viewwin *v, WINDOW *w, int winlines, int wincols) {
     42void owl_viewwin_set_curswin(owl_viewwin *v, WINDOW *w, int winlines, int wincols)
     43{
    4344  v->curswin=w;
    4445  v->winlines=winlines;
     
    4647}
    4748
    48 void owl_viewwin_redisplay(owl_viewwin *v, int update) {
    49   /* regenerate text on the curses window. */
    50   /* if update == 1 then do a doupdate() */
    51 
     49/* regenerate text on the curses window. */
     50/* if update == 1 then do a doupdate() */
     51void owl_viewwin_redisplay(owl_viewwin *v, int update)
     52{
    5253  owl_fmtext fm1, fm2;
    5354 
     
    8283}
    8384
    84 void owl_viewwin_pagedown(owl_viewwin *v) {
     85void owl_viewwin_pagedown(owl_viewwin *v)
     86{
    8587  v->topline+=v->winlines - BOTTOM_OFFSET;
    8688  if ( (v->topline+v->winlines-BOTTOM_OFFSET) > v->textlines) {
     
    8991}
    9092
    91 void owl_viewwin_linedown(owl_viewwin *v) {
     93void owl_viewwin_linedown(owl_viewwin *v)
     94{
    9295  v->topline++;
    9396  if ( (v->topline+v->winlines-BOTTOM_OFFSET) > v->textlines) {
     
    9699}
    97100
    98 void owl_viewwin_pageup(owl_viewwin *v) {
     101void owl_viewwin_pageup(owl_viewwin *v)
     102{
    99103  v->topline-=v->winlines;
    100104  if (v->topline<0) v->topline=0;
    101105}
    102106
    103 void owl_viewwin_lineup(owl_viewwin *v) {
     107void owl_viewwin_lineup(owl_viewwin *v)
     108{
    104109  v->topline--;
    105110  if (v->topline<0) v->topline=0;
    106111}
    107112
    108 void owl_viewwin_right(owl_viewwin *v, int n) {
     113void owl_viewwin_right(owl_viewwin *v, int n)
     114{
    109115  v->rightshift+=n;
    110116}
    111117
    112 void owl_viewwin_left(owl_viewwin *v, int n) {
     118void owl_viewwin_left(owl_viewwin *v, int n)
     119{
    113120  v->rightshift-=n;
    114121  if (v->rightshift<0) v->rightshift=0;
    115122}
    116123
    117 void owl_viewwin_top(owl_viewwin *v) {
     124void owl_viewwin_top(owl_viewwin *v)
     125{
    118126  v->topline=0;
    119127  v->rightshift=0;
    120128}
    121129
    122 void owl_viewwin_bottom(owl_viewwin *v) {
     130void owl_viewwin_bottom(owl_viewwin *v)
     131{
    123132  v->topline = v->textlines - v->winlines + BOTTOM_OFFSET;
    124133}
    125134
    126 void owl_viewwin_free(owl_viewwin *v) {
     135void owl_viewwin_free(owl_viewwin *v)
     136{
    127137  owl_fmtext_free(&(v->fmtext));
    128138}
Note: See TracChangeset for help on using the changeset viewer.