home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / curses-2.10.lha / curses / src / doupdate.c < prev    next >
C/C++ Source or Header  |  1994-02-21  |  2KB  |  86 lines

  1. /* -*-C-*-
  2.  *
  3.  *
  4.  * Filename : doupdate.c
  5.  *
  6.  * Author   : Simon J Raybould.    (sie@fulcrum.bt.co.uk).
  7.  *
  8.  * Date     : Friday 23rd August 1991.
  9.  *
  10.  * Desc     : Send output from previous wnoutrefresh calls.
  11.  *
  12.  *
  13.  * THIS CODE IS NOT PUBLIC DOMAIN
  14.  * ==============================
  15.  * 
  16.  * This code is copyright Simon J Raybould 1991, all rights are reserved.
  17.  * All code, ideas, data structures and algorithms remain the property of the
  18.  * author. Neither the whole nor sections of this code may be used as part
  19.  * of other code without the authors consent. If you wish to use some of this
  20.  * code then please email me at (sie@fulcrum.bt.co.uk).
  21.  *
  22.  * This source is not public domain, so you do not have any right to alter it
  23.  * or sell it for personal gain. The source is provided purely for reference
  24.  * purposes. You may re-compile the source with any compiler you choose.
  25.  * You must not distribute altered copies without the authors consent. My
  26.  * intention is that the source will help people isolate any bugs much more
  27.  * effectivly.
  28.  *
  29.  * Disclaimer
  30.  * ==========
  31.  *
  32.  * No implication is made as to this code being fit for any purpose at all.
  33.  * I (the author) shall not be held responsible for any loss of data or damage 
  34.  * to property that may result from its use or misuse.
  35.  *
  36.  *
  37.  * Revision History
  38.  * ================
  39.  *
  40.  * $Log: doupdate.c,v $
  41.  * Revision 1.3  1993/05/17  23:32:24  sie
  42.  * Underscores added to names.
  43.  *
  44.  * Revision 1.2  1992/06/10  23:44:35  sie
  45.  * Added serial support.
  46.  *
  47.  * Revision 1.1  91/09/07  11:41:07  sie
  48.  * Initial revision
  49.  * 
  50.  *
  51.  */
  52.  
  53. static char *rcsid = "$Header: /SRC/lib/curses/src/RCS/doupdate.c,v 1.3 1993/05/17 23:32:24 sie Exp $";
  54.  
  55. #include <stdlib.h>
  56. #include "acurses.h"
  57.  
  58.  
  59. static void ZapRElList(struct RefreshElement *ElPtr)
  60. {
  61.   if(!ElPtr)
  62.     return;
  63.   if(ElPtr->Next)
  64.     ZapRElList(ElPtr->Next);  /* Recurse my boy */
  65.   free(ElPtr);
  66. }
  67.  
  68. doupdate(void)
  69. {
  70.   struct RefreshElement *ElPtr;
  71.   
  72.   if(!(_CursesFlags & CFLAG_INITSCR))
  73.     return ERR;
  74.   
  75.   ElPtr = _HeadRefreshList;
  76.   while(ElPtr) {
  77.     if(wrefresh(ElPtr->WinPtr) == ERR)
  78.       return ERR;
  79.     ElPtr = ElPtr->Next;
  80.   }
  81.   ZapRElList(_HeadRefreshList);
  82.   _HeadRefreshList = (struct RefreshElement *)NULL;
  83.   
  84.   return OK;
  85. }
  86.