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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? frm_driver.c

?? ncurses-5.4 需要的就來下把 一定會有用的哦
?? C
?? 第 1 頁 / 共 5 頁
字號:
/**************************************************************************** * 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;	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品在线观看| 国产福利91精品一区二区三区| 日韩一区二区三区在线观看| 久久99久久精品欧美| 亚洲欧美另类小说视频| 欧美成人精品二区三区99精品| 成人av网址在线| 另类小说欧美激情| 一区二区激情小说| 中文字幕不卡的av| 欧美一级黄色录像| 欧美制服丝袜第一页| 夫妻av一区二区| 黑人巨大精品欧美黑白配亚洲 | 最新日韩av在线| 日韩三级视频在线观看| 欧美日韩中文国产| 91浏览器入口在线观看| 成人综合婷婷国产精品久久 | 欧美日韩国产成人在线免费| 成人黄色大片在线观看| 精品一区二区成人精品| 日韩精品成人一区二区三区| 亚洲综合一二三区| 亚洲精品久久7777| 国产精品的网站| 精品成a人在线观看| 日韩欧美一区二区不卡| 欧美日韩免费高清一区色橹橹| 9l国产精品久久久久麻豆| 国产成人精品影视| 国产精品一区二区免费不卡| 精品一区二区三区蜜桃| 久久国产人妖系列| 激情综合一区二区三区| 麻豆精品新av中文字幕| 日韩av电影一区| 日本欧美韩国一区三区| 蜜臀av性久久久久av蜜臀妖精| 亚洲成人一区在线| 日本不卡视频在线观看| 日韩高清不卡一区二区三区| 水蜜桃久久夜色精品一区的特点| 亚洲午夜成aⅴ人片| 亚洲一区二区三区美女| 亚洲一区二区三区视频在线播放| 亚洲成人自拍偷拍| 男男gaygay亚洲| 久久国产精品色婷婷| 久久精品国产一区二区三区免费看| 日本vs亚洲vs韩国一区三区 | 国产在线精品一区二区不卡了| 免费观看在线综合色| 免费成人在线影院| 久久精品理论片| 国产精品一区二区免费不卡| 粉嫩在线一区二区三区视频| 不卡av电影在线播放| 91麻豆国产自产在线观看| 一本大道综合伊人精品热热| 99re视频精品| 欧美美女网站色| 欧美变态口味重另类| 久久亚洲免费视频| 国产精品色婷婷久久58| 亚洲另类色综合网站| 午夜精品一区在线观看| 激情小说亚洲一区| 国产成a人亚洲| 色欧美乱欧美15图片| 欧美一级午夜免费电影| 国产亚洲自拍一区| 亚洲蜜臀av乱码久久精品| 午夜影院在线观看欧美| 国产精品456| 在线视频一区二区三| 精品久久人人做人人爰| 最新国产成人在线观看| 日韩国产在线一| 国产91精品欧美| 欧美日韩一区二区不卡| 久久久99精品久久| 一区二区三区91| 精品一区二区三区香蕉蜜桃| 97国产一区二区| 欧美一级日韩免费不卡| 国产精品嫩草影院av蜜臀| 日韩电影免费在线看| 成人中文字幕在线| 欧美精品 日韩| 最新中文字幕一区二区三区| 久久精品国产一区二区| 在线看一区二区| 国产视频在线观看一区二区三区| 亚洲国产一区二区在线播放| 国产精品一区三区| 制服丝袜av成人在线看| 国产精品久久久久久久久动漫| 蜜臀va亚洲va欧美va天堂 | 91网站在线播放| 久久婷婷色综合| 午夜欧美视频在线观看| jvid福利写真一区二区三区| 精品少妇一区二区三区日产乱码 | 色婷婷久久久综合中文字幕| 久久久久久综合| 日本中文字幕一区| 欧美性生活影院| 一区视频在线播放| 国产精品一级片在线观看| 69堂成人精品免费视频| 亚洲最新在线观看| 成人黄色在线视频| 久久一区二区三区四区| 日av在线不卡| 欧美日本免费一区二区三区| 亚洲图片另类小说| 成人妖精视频yjsp地址| 26uuu另类欧美亚洲曰本| 日本人妖一区二区| 欧美精品一卡两卡| 亚洲一区二区三区视频在线| 色一情一乱一乱一91av| 国产精品色哟哟网站| 国产精品一区久久久久| 久久综合狠狠综合久久综合88| 日韩av成人高清| 3atv一区二区三区| 五月婷婷欧美视频| 欧美日韩大陆在线| 午夜精品久久久久久久久| 在线视频综合导航| 亚洲国产一二三| 欧美久久一二三四区| 亚洲成精国产精品女| 欧美日韩一区小说| 天天射综合影视| 欧美精品一二三四| 免费在线观看成人| 精品日产卡一卡二卡麻豆| 麻豆精品在线播放| 久久久亚洲高清| 懂色av一区二区三区免费看| 中文字幕高清不卡| 91一区一区三区| 亚洲一区在线电影| 欧美日韩的一区二区| 麻豆精品久久久| 久久男人中文字幕资源站| 国产成人av一区二区| 中文字幕第一区| 在线精品视频免费观看| 午夜精品久久久久久久久久久| 欧美一级黄色大片| 国产成人在线电影| 国产精品久久久久影视| 91麻豆高清视频| 日日摸夜夜添夜夜添精品视频| 91精品福利在线一区二区三区| 久久99久久99精品免视看婷婷 | 色天天综合久久久久综合片| 欧美亚洲动漫精品| 欧美日韩一区成人| 国产一区二区三区在线观看精品| 欧洲亚洲精品在线| 亚洲国产激情av| 欧美日韩精品一区二区天天拍小说 | 国内一区二区在线| 亚洲一区国产视频| 国产欧美一区二区精品婷婷| 欧美视频在线一区二区三区| 国产成人av一区二区三区在线| 天天av天天翘天天综合网| 中文字幕的久久| 精品福利一区二区三区免费视频| 欧亚洲嫩模精品一区三区| 国产经典欧美精品| 久久精品国产秦先生| 亚洲午夜一二三区视频| 国产精品久久久久久久久图文区 | 91精品国产色综合久久ai换脸| 波多野结衣中文字幕一区| 九色综合国产一区二区三区| 亚洲高清视频的网址| 亚洲色图在线看| 亚洲国产激情av| 久久亚洲精精品中文字幕早川悠里| 欧美日本一道本| 欧美三电影在线| 色天使久久综合网天天| 99综合电影在线视频| 国产精品一区二区免费不卡| 久久精工是国产品牌吗| 免费成人av资源网| 丝袜美腿成人在线| 视频在线在亚洲| 视频一区视频二区中文字幕| 亚洲国产成人porn| 亚洲一区二区三区四区在线免费观看| 自拍偷在线精品自拍偷无码专区 |