亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? frm_driver.c

?? ncurses-5.4 需要的就來下把 一定會(huì)有用的哦
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/**************************************************************************** * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc.              * *                                                                          * * Permission is hereby granted, free of charge, to any person obtaining a  * * copy of this software and associated documentation files (the            * * "Software"), to deal in the Software without restriction, including      * * without limitation the rights to use, copy, modify, merge, publish,      * * distribute, distribute with modifications, sublicense, and/or sell       * * copies of the Software, and to permit persons to whom the Software is    * * furnished to do so, subject to the following conditions:                 * *                                                                          * * The above copyright notice and this permission notice shall be included  * * in all copies or substantial portions of the Software.                   * *                                                                          * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    * * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               * *                                                                          * * Except as contained in this notice, the name(s) of the above copyright   * * holders shall not be used in advertising or otherwise to promote the     * * sale, use or other dealings in this Software without prior written       * * authorization.                                                           * ****************************************************************************//**************************************************************************** *   Author:  Juergen Pfeifer, 1995,1997                                    * ****************************************************************************/#include "form.priv.h"MODULE_ID("$Id: frm_driver.c,v 1.45 2003/12/06 17:22:42 tom Exp $")/*----------------------------------------------------------------------------  This is the core module of the form library. It contains the majority  of the driver routines as well as the form_driver function.   Essentially this module is nearly the whole library. This is because  all the functions in this module depends on some others in the module,  so it makes no sense to split them into separate files because they  will always be linked together. The only acceptable concern is turnaround  time for this module, but now we have all Pentiums or RISCs, so what!  The driver routines are grouped into nine generic categories:   a)   Page Navigation            ( all functions prefixed by PN_ )        The current page of the form is left and some new page is        entered.   b)   Inter-Field Navigation     ( all functions prefixed by FN_ )        The current field of the form is left and some new field is        entered.   c)   Intra-Field Navigation     ( all functions prefixed by IFN_ )        The current position in the current field is changed.    d)   Vertical Scrolling         ( all functions prefixed by VSC_ )        Essentially this is a specialization of Intra-Field navigation.        It has to check for a multi-line field.   e)   Horizontal Scrolling       ( all functions prefixed by HSC_ )        Essentially this is a specialization of Intra-Field navigation.        It has to check for a single-line field.   f)   Field Editing              ( all functions prefixed by FE_ )        The content of the current field is changed   g)   Edit Mode requests         ( all functions prefixed by EM_ )        Switching between insert and overlay mode   h)   Field-Validation requests  ( all functions prefixed by FV_ )        Perform verifications of the field.   i)   Choice requests            ( all functions prefixed by CR_ )        Requests to enumerate possible field values  --------------------------------------------------------------------------*//*----------------------------------------------------------------------------  Some remarks on the placements of assert() macros :  I use them only on "strategic" places, i.e. top level entries where  I want to make sure that things are set correctly. Throughout subordinate  routines I omit them mostly.  --------------------------------------------------------------------------*//*Some options that may effect compatibility in behavior to SVr4 forms,but they are here to allow a more intuitive and user friendly behavior ofour form implementation. This doesn't affect the API, so we feel it isuncritical.The initial implementation tries to stay very close with the behaviorof the original SVr4 implementation, although in some areas it is quiteclear that this isn't the most appropriate way. As far as possible thissources will allow you to build a forms lib that behaves quite similarto SVr4, but now and in the future we will give you better options. Perhaps at some time we will make this configurable at runtime.*//* Implement a more user-friendly previous/next word behavior */#define FRIENDLY_PREV_NEXT_WORD (1)/* Fix the wrong behavior for forms with all fields inactive */#define FIX_FORM_INACTIVE_BUG (1)/* Allow dynamic field growth also when navigating past the end */#define GROW_IF_NAVIGATE (1)/*----------------------------------------------------------------------------  Forward references to some internally used static functions  --------------------------------------------------------------------------*/static int Inter_Field_Navigation ( int (* const fct) (FORM *), FORM * form );static int FN_Next_Field (FORM * form);static int FN_Previous_Field (FORM * form);static int FE_New_Line(FORM *);static int FE_Delete_Previous(FORM *);/*----------------------------------------------------------------------------  Macro Definitions.  Some Remarks on that: I use the convention to use UPPERCASE for constants  defined by Macros. If I provide a macro as a kind of inline routine to  provide some logic, I use my Upper_Lower case style.  --------------------------------------------------------------------------*//* Calculate the position of a single row in a field buffer */#define Position_Of_Row_In_Buffer(field,row) ((row)*(field)->dcols)/* Calculate start address for the fields buffer# N */#define Address_Of_Nth_Buffer(field,N) \  ((field)->buf + (N)*(1+Buffer_Length(field)))/* Calculate the start address of the row in the fields specified buffer# N */#define Address_Of_Row_In_Nth_Buffer(field,N,row) \  (Address_Of_Nth_Buffer(field,N) + Position_Of_Row_In_Buffer(field,row))/* Calculate the start address of the row in the fields primary buffer */#define Address_Of_Row_In_Buffer(field,row) \  Address_Of_Row_In_Nth_Buffer(field,0,row)/* Calculate the start address of the row in the forms current field   buffer# N */#define Address_Of_Current_Row_In_Nth_Buffer(form,N) \   Address_Of_Row_In_Nth_Buffer((form)->current,N,(form)->currow)/* Calculate the start address of the row in the forms current field   primary buffer */#define Address_Of_Current_Row_In_Buffer(form) \   Address_Of_Current_Row_In_Nth_Buffer(form,0)/* Calculate the address of the cursor in the forms current field   primary buffer */#define Address_Of_Current_Position_In_Nth_Buffer(form,N) \   (Address_Of_Current_Row_In_Nth_Buffer(form,N) + (form)->curcol)/* Calculate the address of the cursor in the forms current field   buffer# N */#define Address_Of_Current_Position_In_Buffer(form) \  Address_Of_Current_Position_In_Nth_Buffer(form,0)/* Logic to decide whether or not a field is actually a field with   vertical or horizontal scrolling */#define Is_Scroll_Field(field)          \   (((field)->drows > (field)->rows) || \    ((field)->dcols > (field)->cols))/* Logic to decide whether or not a field needs to have an individual window   instead of a derived window because it contains invisible parts.   This is true for non-public fields and for scrollable fields. */#define Has_Invisible_Parts(field)     \  (!((field)->opts & O_PUBLIC)      || \   Is_Scroll_Field(field))/* Logic to decide whether or not a field needs justification */#define Justification_Allowed(field)        \   (((field)->just != NO_JUSTIFICATION)  && \    (Single_Line_Field(field))           && \    (((field)->dcols == (field)->cols)   && \    ((field)->opts & O_STATIC))             )/* Logic to determine whether or not a dynamic field may still grow */#define Growable(field) ((field)->status & _MAY_GROW)/* Macro to set the attributes for a fields window */#define Set_Field_Window_Attributes(field,win) \(  wbkgdset((win),(chtype)((field)->pad | (field)->back)), \   wattrset((win),(field)->fore) )/* Logic to decide whether or not a field really appears on the form */#define Field_Really_Appears(field)         \  ((field->form)                          &&\   (field->form->status & _POSTED)        &&\   (field->opts & O_VISIBLE)              &&\   (field->page == field->form->curpage))/* Logic to determine whether or not we are on the first position in the   current field */#define First_Position_In_Current_Field(form) \  (((form)->currow==0) && ((form)->curcol==0))#define Minimum(a,b) (((a)<=(b)) ? (a) : (b))#define Maximum(a,b) (((a)>=(b)) ? (a) : (b))/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static char *Get_Start_Of_Data(char * buf, int blen)|   |   Description   :  Return pointer to first non-blank position in buffer.|                    If buffer is empty return pointer to buffer itself.||   Return Values :  Pointer to first non-blank position in buffer+--------------------------------------------------------------------------*/INLINE static char *Get_Start_Of_Data(char * buf, int blen){  char *p   = buf;  char *end = &buf[blen];  assert(buf && blen>=0);  while( (p < end) && is_blank(*p) )     p++;  return( (p==end) ? buf : p );}/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static char *After_End_Of_Data(char * buf, int blen)|   |   Description   :  Return pointer after last non-blank position in buffer.|                    If buffer is empty, return pointer to buffer itself.||   Return Values :  Pointer to position after last non-blank position in |                    buffer.+--------------------------------------------------------------------------*/INLINE static char *After_End_Of_Data(char * buf,int blen){  char *p   = &buf[blen];    assert(buf && blen>=0);  while( (p>buf) && is_blank(p[-1]) )     p--;  return( p );}/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static char *Get_First_Whitespace_Character(|                                     char * buf, int   blen)|   |   Description   :  Position to the first whitespace character.||   Return Values :  Pointer to first whitespace character in buffer.+--------------------------------------------------------------------------*/INLINE static char *Get_First_Whitespace_Character(char * buf, int blen){  char *p   = buf;  char *end = &p[blen];    assert(buf && blen>=0);  while( (p < end) && !is_blank(*p))     p++;  return( (p==end) ? buf : p );}/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static char *After_Last_Whitespace_Character(|                                     char * buf, int blen)|   |   Description   :  Get the position after the last whitespace character.||   Return Values :  Pointer to position after last whitespace character in |                    buffer.+--------------------------------------------------------------------------*/INLINE static char *After_Last_Whitespace_Character(char * buf, int blen){  char *p   = &buf[blen];    assert(buf && blen>=0);  while( (p>buf) && !is_blank(p[-1]) )     p--;  return( p );}/* Set this to 1 to use the div_t version. This is a good idea if your   compiler has an intrinsic div() support. Unfortunately GNU-C has it   not yet.    N.B.: This only works if form->curcol follows immediately form->currow         and both are of type int. */#define USE_DIV_T (0)/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static void Adjust_Cursor_Position(|                                       FORM * form, const char * pos)|   |   Description   :  Set current row and column of the form to values |                    corresponding to the buffer position.||   Return Values :  -+--------------------------------------------------------------------------*/INLINE static void Adjust_Cursor_Position(FORM * form, const char * pos){  FIELD *field;  int idx;  field = form->current;  assert( pos >= field->buf && field->dcols > 0);  idx = (int)( pos - field->buf );#if USE_DIV_T  *((div_t *)&(form->currow)) = div(idx,field->dcols);#else  form->currow = idx / field->dcols;  form->curcol = idx - field->cols * form->currow;#endif    if ( field->drows < form->currow )    form->currow = 0;}/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static void Buffer_To_Window(|                                      const FIELD  * field,|                                      WINDOW * win)|   |   Description   :  Copy the buffer to the window. If it is a multi-line|                    field, the buffer is split to the lines of the|                    window without any editing.||   Return Values :  -+--------------------------------------------------------------------------*/static void Buffer_To_Window(const FIELD  * field, WINDOW * win){  int width, height;  int len;  int row;  char *pBuffer;  assert(win && field);  width  = getmaxx(win);  height = getmaxy(win);  for(row=0, pBuffer=field->buf;       row < height;       row++, pBuffer += width )    {      if ((len = (int)( After_End_Of_Data( pBuffer, width ) - pBuffer )) > 0)	{	  wmove( win, row, 0 );	  waddnstr( win, pBuffer, len );	}    }	}/*---------------------------------------------------------------------------|   Facility      :  libnform  |   Function      :  static void Window_To_Buffer(|                                          WINDOW * win,|                                          FIELD  * field)|   |   Description   :  Copy the content of the window into the buffer.|                    The multiple lines of a window are simply|                    concatenated into the buffer. Pad characters in|                    the window will be replaced by blanks in the buffer.||   Return Values :  -+--------------------------------------------------------------------------*/static void Window_To_Buffer(WINDOW * win, FIELD  * field){  int pad;  int len = 0;  char *p;  int row, height;    assert(win && field && field->buf );  pad = field->pad;  p = field->buf;  height = getmaxy(win);  for(row=0; (row < height) && (row < field->drows); row++ )    {      wmove( win, row, 0 );      len += winnstr( win, p+len, field->dcols );    }  p[len] = '\0';  /* replace visual padding character by blanks in buffer */  if (pad != C_BLANK)    {      int i;      for(i=0; i<len; i++, p++)	{	  if (*p==pad) 	    *p = C_BLANK;	}    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国欧美一区二区| 日韩亚洲欧美中文三级| 高清国产一区二区| 国产一区二区调教| 国产麻豆精品视频| 国产精品自拍一区| 国产91富婆露脸刺激对白| 国产成人无遮挡在线视频| 国产激情视频一区二区在线观看 | 日韩一级完整毛片| 在线91免费看| 欧美一区二区三区成人| 日韩一级大片在线观看| 久久这里只有精品首页| 久久久不卡网国产精品二区| 国产日韩欧美电影| 国产精品第四页| 亚洲永久免费视频| 日韩国产精品久久| 狠狠久久亚洲欧美| 成人动漫av在线| 欧美午夜精品免费| 91精品国产综合久久香蕉的特点 | 亚洲自拍欧美精品| 石原莉奈一区二区三区在线观看| 免费看欧美女人艹b| 国产成人精品影院| 99久久777色| 91精品在线一区二区| 26uuu精品一区二区在线观看| 亚洲国产激情av| 亚洲一区二区在线视频| 久久国产精品一区二区| 成人激情av网| 欧美日韩成人高清| 久久亚洲综合色一区二区三区| 亚洲三级小视频| 日韩电影免费在线看| 国产麻豆成人精品| 欧美中文字幕一区| 日韩亚洲电影在线| 国产精品电影一区二区| 日韩黄色小视频| 成人av网在线| 日韩一区二区在线观看视频 | 国产一区二区三区av电影| av福利精品导航| 91精品国产品国语在线不卡| 国产婷婷一区二区| 五月婷婷久久综合| 岛国av在线一区| 在线成人小视频| 国产精品国产馆在线真实露脸| 丝袜美腿一区二区三区| 暴力调教一区二区三区| 日韩欧美www| 一区二区免费视频| 国产精品一色哟哟哟| 欧美日韩国产首页在线观看| 国产欧美精品一区二区色综合 | 极品少妇一区二区| 欧美性一级生活| 国产精品人成在线观看免费 | 国产黄色精品网站| 欧美视频你懂的| 欧美国产1区2区| 久久99国产精品免费网站| 色天天综合久久久久综合片| 久久影院午夜片一区| 亚洲福利视频导航| 色综合久久久久久久久| 国产欧美一区二区在线| 男女视频一区二区| 欧美少妇bbb| 日韩理论电影院| 国产成人在线色| 日韩一级高清毛片| 日韩在线观看一区二区| 91福利精品视频| 国产精品妹子av| 国产毛片精品视频| 日韩精品一区二区三区中文不卡| 亚洲综合免费观看高清完整版 | 欧美性大战久久| 亚洲免费色视频| 99在线精品观看| 中文字幕精品三区| 国产成人免费视频网站| 2021中文字幕一区亚洲| 久久精品国产色蜜蜜麻豆| 欧美一二三区在线| 日韩精品一级中文字幕精品视频免费观看| 在线观看中文字幕不卡| 一区二区三区中文字幕在线观看| 99久久99久久精品免费观看| 中文字幕视频一区二区三区久| 粉嫩绯色av一区二区在线观看| 久久综合九色综合97婷婷| 黄色小说综合网站| 精品国产乱码久久久久久久久| 精品一区二区免费看| 精品少妇一区二区三区在线视频| 青娱乐精品视频| 欧美大片一区二区三区| 韩日精品视频一区| 久久精品欧美一区二区三区不卡| 国产一区二区在线免费观看| 久久久久久**毛片大全| 成人国产精品免费观看视频| 中文字幕中文字幕中文字幕亚洲无线| av在线不卡电影| 一区二区欧美视频| 欧美久久一二三四区| 免费看欧美美女黄的网站| 久久综合九色综合欧美亚洲| 国产精品一级片| 中文字幕亚洲一区二区va在线| 色香蕉成人二区免费| 亚洲国产精品久久艾草纯爱| 6080日韩午夜伦伦午夜伦| 紧缚捆绑精品一区二区| 日本一区二区三区四区| 91丨porny丨最新| 亚洲国产精品一区二区久久| 日韩午夜三级在线| 国产自产2019最新不卡| 中文字幕一区二| 欧美性xxxxxxxx| 久久99精品久久久| 中文字幕欧美三区| 欧美三级日韩在线| 久草中文综合在线| 中文字幕一区二区三区四区 | 一区二区三区在线免费播放 | 成人免费在线视频| 欧美丰满嫩嫩电影| 国产精品一二三| 一区二区三区日韩精品视频| 欧美一级生活片| 国产成人小视频| 亚洲国产精品久久久男人的天堂| 日韩欧美在线影院| 成人午夜短视频| 亚洲国产精品久久久男人的天堂| 久久综合九色综合久久久精品综合| 99久久er热在这里只有精品66| 午夜影视日本亚洲欧洲精品| 久久综合九色综合久久久精品综合| 一本色道久久综合狠狠躁的推荐| 美国av一区二区| 亚洲人一二三区| 精品国产露脸精彩对白| 日本韩国精品在线| 黄页视频在线91| 亚洲一区二区三区四区的| 久久综合久久综合亚洲| 欧美亚洲一区二区在线| 国产精品自拍在线| 日韩黄色小视频| 亚洲理论在线观看| 久久久五月婷婷| 91精品婷婷国产综合久久性色| av不卡在线观看| 国产自产2019最新不卡| 亚洲高清视频的网址| 国产精品三级久久久久三级| 欧美电影免费提供在线观看| 一本久久综合亚洲鲁鲁五月天| 精品一区二区影视| 午夜精品视频在线观看| 日韩一区欧美小说| 精品国产乱码久久| 欧美顶级少妇做爰| 日本精品一区二区三区高清 | 欧美日韩免费视频| av亚洲精华国产精华| 国产成人综合在线| 日韩avvvv在线播放| 一区二区三区av电影| 国产精品高清亚洲| 久久人人97超碰com| 日韩一区二区三区在线观看| 欧美性色aⅴ视频一区日韩精品| 91在线视频播放| 丁香婷婷深情五月亚洲| 国产一区欧美二区| 精品在线视频一区| 久久精品国产一区二区三区免费看| 亚洲国产中文字幕在线视频综合| 亚洲天堂网中文字| 日本一区二区三区视频视频| 久久久蜜桃精品| xnxx国产精品| 亚洲精品一区二区精华| 91精品国产综合久久久蜜臀图片| 欧美日韩国产a| 欧美日韩国产成人在线免费| 欧美日韩一级二级三级| 一本大道久久精品懂色aⅴ | 国产精品国产成人国产三级|