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

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

?? preform.c

?? LP830 無線識別卡 讀寫程序demo
?? C
?? 第 1 頁 / 共 5 頁
字號:
      else
         putch(' ');                // Yes, do not echo a carriage return.
   for ( ; num_digits; num_digits--)
      putch(BACK_SPACE);            // Get the cursor back to where it began.
}


// ****************************************************************************
// To read in a decimal number, the digits must be entered. That is what this 
// routine does. The digit input string will be terminated with a carriage return.
// This routine will only accept and echo characters of 0 to 9.
// Assumed the ASCII string of more than MAX_DEC_DIGITS BYTEs (one for the CR).
//
// Input:        Pointer to where the digit input string should be placed.
//                  It is assumed to have at least MAX_DEC_DIGITS+1 BYTES of space.
//               The maximum value allowed for this input.
//               The minimum value allowed for this input.
// Return:       BOOLEAN - TRUE,  characters input.
//                         FALSE, ESE entered to exit.
// Side effects: Length BYTES at the ASCII string might be altered.
static BYTE inp_decimal(BYTE* digits_here, WORD min_value, WORD max_value) 
{
   WORD  cur_value;           // Hold the current value being read in.
   WORD  dig_pos;             // The string position (index) of the next character.
   WORD  num_digts;           // Number of digits in the string, Maximum entered.
   BYTE  ascii_string[MAX_DEC_DIGITS + 2];  // Hold digits being input.
   BYTE  inp_char;            // Last character input.
   
   num_digts = dig_pos = cur_value = 0;   // No valid digits input yet.
   memset(digits_here, ' ', MAX_DEC_DIGITS);  // Fill with spaces.
   digits_here[MAX_DEC_DIGITS] = CR;    // Be sure it is carriage return terminated.
   do
   {
      if ((inp_char = getch_cont()) EQ ESC)  // This echos the character.
         return(FALSE);           // Exit on ESC.  Confused user?
      if (inp_char EQ ARROW_HI_BYTE) // It might be a valid control key.
      {  // Then, if the next input makes it a valid control continue the do loop.
         if ((inp_char = getch_cont()) EQ LEFT_ARROW)
         {
            if (dig_pos) // Some digits have been input to back up over.
            {
               putch(BACK_SPACE);         // Back up on the screen.
               dig_pos = dig_pos - 1;     // Backing up over a character.
            } else
               putch(BELL);                  // ERROR beep, if can.
         } else if (inp_char EQ RIGHT_ARROW)
         {
            if ((dig_pos < MAX_DEC_DIGITS - 1) AND (dig_pos < num_digts))
               putch(digits_here[dig_pos++]); // Print again what is in the buffer.
            else
               putch(BELL);                  // ERROR beep, if can.
         } else if (inp_char EQ DELETE)
         {
            if (num_digts AND (num_digts NE dig_pos)) 
               num_digts = num_digts - 1;
            del_digit(&digits_here[dig_pos]);  // and update the display.
         } else
            putch(BELL);                  // ERROR beep, if can.
      } else if (inp_char EQ BACK_SPACE)
      {
         if (dig_pos) // Some digits have been entered to back up over.
         {
            putch(BACK_SPACE);            // Backup.
            dig_pos = dig_pos - 1;        // New cursor position.
            if (num_digts AND (num_digts NE dig_pos)) 
               num_digts = num_digts - 1;
            del_digit(&digits_here[dig_pos]);  // and update the display.
         } else
            putch(BELL);                  // ERROR beep, if can.
      } else if (inp_char NE CR)          // A carriage return is used to terminate
      {                                   // The CR terminator will be added later.
         if (dig_pos < MAX_DEC_DIGITS)
         {
            if (inp_char >= '0' AND inp_char <= '9') 
            {  // Valid character input. Put it in string copy and check for
               memcpy(ascii_string, digits_here, MAX_DEC_DIGITS + 1);
               ascii_string[dig_pos] = inp_char; // Put in buffer for to check it.
               if (dec_word_val(ascii_string, &cur_value))
               {
                  if (cur_value <= max_value)
                  {
                     putch(inp_char);           // Echo what was just input.
                     digits_here[dig_pos++] = inp_char; // Save in input buffer.
                     if (dig_pos > num_digts)
                        num_digts = dig_pos;    // Sting getting longer.
                  } else
                     putch(BELL);               // ERROR beep, if can.
               } else // The new digit entered would make an overflow.
                  putch(BELL);                  // ERROR beep, if can.
            } else
               putch(BELL);                     // ERROR beep, if can.
         }
      } else if ((cur_value < min_value) AND (num_digts NE 0)) // Invalid ENTER key?
          putch(BELL);                           // ERROR beep, if can.
      dec_word_val(digits_here, &cur_value);     // Set to current value in string.
      if ((inp_char EQ CR) AND (num_digts EQ 0)) // No digits just ENTER.
         cur_value = min_value;                  // force exit.
   } while ((inp_char NE CR) OR (cur_value < min_value)); // Until CR and big enough.
   digits_here[num_digts] = CR;  // Terminate with a carriage return.
   return(TRUE);
}

// ****************************************************************************
// To read in a number the digits must be entered. That is what this routine does.
// It actually just reads in a string of bytes input at the keypad.  This
// is to support exiting with ESC and use of the back space or left and right
// arrow keys.  The digit input string will be terminated with the carriage return.
// It will only accept and echo characters for the base being input for.
// Assumed the ASCII string has points to at least (number_length + 1) data bytes.
// Hexadecimal, decimal, and binary are all supported.  Although, (because of
// the Del key) this should only be used for hexadecimal and binary input.
//
// Input:        Pointer to where the digit input string should be placed.
//               Maximum number of digits to be input for this number.
//                  The *ASCII string must have one more byte, for the carriage return.
//               Base (HEX, DEC,or BIN ) the digits are being input for.
//               The character to 'fill' the empty digit string with, before digits.
// Return:       BOOLEAN - TRUE,  characters input.
//                         FALSE, ESE entered to exit.
// Side effects: Length BYTES at the ASCII string might be altered.
static BYTE inp_digstring(BYTE* ascii_string, WORD number_length, 
   enum data_type base, BYTE fill_char) 
{
   int   num_digs;     // Number of digits that have been entered.
   WORD  dig_pos;      // The string position (index) of the next character.
   BYTE  inp_char;     // Last character input.
   
   num_digs = dig_pos = 0;   // No valid digits input yet.
   memset(ascii_string, fill_char, number_length); // Fill with spaces.
   ascii_string[number_length] = CR; // Terminate with a carriage return. 
   do
   {
      if ((inp_char = getch_cont()) EQ ESC)  // This echos the character.
         return(FALSE);           // Exit on ESC.  Confused user?
      if (inp_char EQ ARROW_HI_BYTE)
      {
         if ((inp_char = getch_cont()) EQ LEFT_ARROW)
         {
            if (dig_pos) // Some digits have been input to back up over.
            {
               putch(BACK_SPACE);            // Back up on the screen.
               dig_pos = dig_pos - 1;        // Backing up over a character.
            } else
               putch(BELL);                  // ERROR beep, if can.
         } else if (inp_char EQ RIGHT_ARROW)
         {
            if (dig_pos < number_length - 1)
               putch(ascii_string[dig_pos++]); // Print again what is in the buffer.
            else
               putch(BELL);                  // ERROR beep, if can.
         } else if (inp_char EQ DELETE)
         {
            if (dig_pos < number_length)  // At the end of the bigest number?
            {                             // NO, there is something to delete.
               if (ascii_string[dig_pos] NE fill_char) // Is a digit being deleted?
                  num_digs = num_digs - 1; // A digit deleted.
               ascii_string[dig_pos] = fill_char; // Last character is gone.
               putch(fill_char);           // Erase from screen last character.
               putch(BACK_SPACE);          // Backup over the ' ' just printed.
            }
         } else
            putch(BELL);                  // ERROR beep, if can.
      } else if (inp_char EQ BACK_SPACE)
      {
         if (dig_pos) // Some digits have been input to back up over.
         {
            putch(inp_char);                   // Echo what was just input.
            dig_pos = dig_pos - 1;             // Backing up over a character.
            if (ascii_string[dig_pos] NE fill_char) // Is a digit being deleted?
               num_digs = num_digs - 1;        // A digit deleted.
            ascii_string[dig_pos] = fill_char; // Last character is gone.
            putch(fill_char);                  // Erase from screen last character.
            putch(BACK_SPACE);                 // Backup over the ' ' just printed.
         } else
            putch(BELL);                  // ERROR beep, if can.
      } else if (inp_char NE CR)
      { // Leave at least one space (' ') to terminate the number.
         if (dig_pos < number_length)
         {
            switch (base)
            {
            case HEX:
               inp_char = toupper(inp_char); // Convert to upper case.
               if ((inp_char >= '0' AND inp_char <= '9') OR
                  (inp_char >= 'A' AND inp_char <= 'F'))
               {
                  putch(inp_char);                  // Echo what was just input.
                  ascii_string[dig_pos++] = inp_char; // Save in input buffer.
                  num_digs = num_digs + 1;   // Count another digit entered.
               } else
                  putch(BELL);               // ERROR beep, if can.
               break;

            case DEC:
               if (inp_char >= '0' AND inp_char <= '9') 
               {
                  putch(inp_char);                  // Echo what was just input.
                  ascii_string[dig_pos++] = inp_char; // Save in input buffer.
                  num_digs = num_digs + 1;   // Count another digit entered.
               } else
                  putch(BELL);               // ERROR beep, if can.
               break;

            case BIN:
               if (inp_char >= '0' AND inp_char <= '1') 
               {
                  putch(inp_char);                  // Echo what was just input.
                  ascii_string[dig_pos++] = inp_char; // Save in input buffer.
                  num_digs = num_digs + 1;   // Count another digit entered.
               } else
                  putch(BELL);               // ERROR beep, if can.
               break;
               
            default:
               return(FALSE);    // ERROR! this should never happen
            }
         }
      } else if (base EQ BIN) // It is a CR, but Binary must input all digits.
         if ((NOT eight_binary_digits(ascii_string)) AND  // If all binary digitse
            (num_digs NE 0))    // And some digits have been entered.
         {   
            inp_char = 0;       // Not all a 1 or 0, then not done. Ignore CR.
            putch(BELL);        // ERROR beep, if can.
         }
   } while (inp_char NE CR); 
   if (num_digs <= 0)
      ascii_string[0] = CR;   // ENTER key with no digits.
   printf("\n");      
   return(TRUE);
}

// ****************************************************************************
// Input a decimal number, character by character. 
// sscanf() would be used, but that waits for a CR.  
// ESC must be detected, to exit.
// ENTER alone should also be recognized as a special case.
// As a result, inp_num() is returning an unsigned number that will have a value
// that will fit in a signed number.  ALL valid numbers (not a flag)
// will have the sign bit cleared. Flag values, for things like ESC or ENTER,
// will have the sign bit set (0x8000).
//
// Input:        The maximum value allowed for this input.
// Return:       Number input, TOO_BIG_VAL if ESC was entered to exit,
//               or ENTER_ALONE if no digits entered, but the ENTER key was pressed.
// Side effects: NONE.
WORD inp_num(WORD max_value) 
{
   BYTE  ascii_number[MAX_DEC_DIGITS + 2];  // Hold digits being input.
   WORD  this_value;          // Build the value being input here.
   
   this_value = 0;            // Initialize working variables.
   if (NOT inp_decimal(ascii_number, 0, max_value))
       return(TOO_BIG_VAL);   // Use is trying to ESCape out.
   printf("\n");              // Echo the terminating carriage return.
   if (ascii_number[0] EQ CR) // No digits, only the ENTER key.
      return(ENTER_ALONE);    // Thus, done with entering data.
   if (dec_word_val(ascii_number, &this_value))
      return(this_value);     // Valid decimal number entered. Return it!
   return(0);                 // Should never get here, but be safe.
}

// ****************************************************************************
// Input a hexadecimal number, character by character. sscanf() would be used, 
// but that waits for a CR.  ESC must be detected, to exit.
//
// Input:        NONE.
// Return:       Number input, TOO_BIG_VAL if ESC was entered to exit,.
//               or ENTER_ALONE if no digits entered, but the ENTER key was pressed.
// Side effects: NONE.
WORD inp_hex(void) 
{
   WORD  incom_value;    // Build the value being input here.
   BYTE  ascii_number[MAX_HEX_DIG + 2];  // Hold digits being input and a CR.
   BYTE* digit_ptr;      // Point to where the next digit goes.

   incom_value = 0;
   if (NOT inp_digstring(ascii_number, MAX_HEX_DIG, HEX, ' '))
      return(TOO_BIG_VAL);     // Use is trying to ESCAPE out.
   digit_ptr = ascii_number;   // Point at the character just input.
   if (*digit_ptr EQ CR)       // No digits, only the ENTER key.
      return(ENTER_ALONE);     // Return to caller for a try again, or default.
   while (*digit_ptr NE CR)    // Loop until done and time to returns.
   {                          
      if ((*digit_ptr >= '0') AND (*digit_ptr <= '9'))  // Another digit entered?
         incom_value = (incom_value << 4) + *digit_ptr - '0'; // Add in new value.
      else if ((*digit_ptr >= 'A') AND (*digit_ptr <= 'F'))   // Hex dig?
         incom_value = (incom_value << 4) + *digit_ptr - 'A' + 0x0A; // Update value.
      digit_ptr++;        // Count another valid digit entered.
   }
   return(incom_value);   // Done imputing, return the input value.
}

// ****************************************************************************
// Input a binary number, character by character. sscanf() would be used, 
// but that waits for a CR.  ESC must be detected, to exit.
//
// Input:        NONE.
// Return:       Number input, TOO_BIG_VAL if ESC was entered to exit,
//               or ENTER_ALONE if no digits entered, but the ENTER key was pressed.
// Side effects: NONE.
WORD inp_bin(void) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产天堂| 91老师国产黑色丝袜在线| 亚洲成a人片在线不卡一二三区| 国产精品福利一区二区| 亚洲一区二区三区爽爽爽爽爽| 午夜精品视频一区| 精品一二线国产| 色综合激情五月| 久久久久久久av麻豆果冻| 久久你懂得1024| 亚洲大尺度视频在线观看| 国产在线精品免费| 91黄色免费网站| 久久久久久久久久美女| 亚洲线精品一区二区三区八戒| 国产老女人精品毛片久久| 色香色香欲天天天影视综合网| 精品久久久久一区| 一二三区精品视频| 菠萝蜜视频在线观看一区| 欧美一卡二卡三卡四卡| 亚洲激情网站免费观看| 国产精品一区免费视频| 欧美日韩一级二级三级| 日本一区二区三区在线观看| 丝袜亚洲另类欧美综合| 国产精品一区二区三区四区| 欧美精品一区二区三区蜜桃| 日本中文在线一区| 在线成人免费视频| 丝袜脚交一区二区| 欧美日韩一区在线| 亚洲午夜久久久| 欧美系列亚洲系列| 洋洋成人永久网站入口| 91福利资源站| 五月天中文字幕一区二区| 欧美日韩专区在线| 免费看精品久久片| 精品日韩在线一区| 欧美日韩三级一区| 免播放器亚洲一区| 久久精子c满五个校花| 国产成人亚洲综合a∨婷婷图片| 欧美精品一区二区三区四区 | 首页综合国产亚洲丝袜| 欧美一区永久视频免费观看| 美国十次综合导航| 欧美精品一区二区三区视频| 99精品热视频| 日本成人中文字幕在线视频| 国产亚洲精品免费| 欧美日韩一级大片网址| 国产成人免费视频一区| 亚洲三级电影网站| 日韩一区二区三区在线| 成人app在线观看| 日韩成人一级大片| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲综合小说图片| 亚洲国产精品成人久久综合一区 | 国产午夜精品一区二区三区视频 | 久久久久久免费| 欧美日韩在线三级| 国产成人av一区二区三区在线| 亚洲一区二区三区国产| 国产精品久久一级| 久久亚洲二区三区| 欧美精品视频www在线观看| 国产999精品久久| 青青青爽久久午夜综合久久午夜| 亚洲美女精品一区| 国产精品伦理在线| 欧美国产精品专区| 国产日韩欧美精品电影三级在线| 91精品免费在线| 欧美另类变人与禽xxxxx| 一本久道中文字幕精品亚洲嫩| 色综合天天做天天爱| 成人激情小说网站| 97精品国产露脸对白| www.av精品| 精品视频一区二区三区免费| 欧美日韩激情在线| 欧美一区二区视频观看视频| 日韩一级免费观看| 国产女人aaa级久久久级| 国产精品人人做人人爽人人添| 亚洲天堂成人在线观看| 亚洲图片自拍偷拍| 九九热在线视频观看这里只有精品| 国模少妇一区二区三区| 成人永久免费视频| 精品少妇一区二区三区日产乱码 | 一本高清dvd不卡在线观看| 4hu四虎永久在线影院成人| 日韩一区二区三| 国产精品免费av| 亚洲超碰精品一区二区| 麻豆免费精品视频| 粉嫩嫩av羞羞动漫久久久| 色88888久久久久久影院野外| 69精品人人人人| 国产精品视频yy9299一区| 一区二区三区中文在线| 久久99精品久久久久久动态图| 成人少妇影院yyyy| 这里只有精品电影| 亚洲精品高清在线| 成人av网站在线| 精品久久久久久无| 亚洲午夜久久久久久久久电影院| 韩国中文字幕2020精品| 91麻豆精品91久久久久同性| 亚洲欧美日韩国产另类专区| 久久99精品久久久| 91精品在线一区二区| 亚洲伦在线观看| 国产99久久久精品| 久久久久久久久97黄色工厂| 老司机精品视频一区二区三区| 欧美久久久久免费| 舔着乳尖日韩一区| 欧美午夜一区二区三区免费大片| 成人免费在线播放视频| 成人一区在线观看| 亚洲女女做受ⅹxx高潮| 91麻豆免费视频| 亚洲色图.com| 日本精品免费观看高清观看| 亚洲综合网站在线观看| 日韩一区二区在线播放| 精品一区二区日韩| 亚洲视频小说图片| 欧美性色黄大片| 麻豆国产精品一区二区三区| 2017欧美狠狠色| 91色九色蝌蚪| 亚洲午夜久久久久久久久电影院| 337p亚洲精品色噜噜| 久久99国产乱子伦精品免费| 欧美高清在线精品一区| 欧美日本一区二区三区| 国产一区二区在线视频| 亚洲同性同志一二三专区| 欧美精品成人一区二区三区四区| 免费成人av资源网| 国产精品人人做人人爽人人添| 欧美日韩精品福利| 成人精品一区二区三区四区| 日韩国产高清影视| 最近日韩中文字幕| 久久免费电影网| 91在线porny国产在线看| 91浏览器在线视频| 欧美日韩国产另类一区| 波多野结衣亚洲| 国产在线精品免费| 国产尤物一区二区在线| 亚洲成精国产精品女| 日韩欧美在线观看一区二区三区| 成人性生交大合| 免费欧美高清视频| 亚洲国产你懂的| 国产精品不卡在线| 91精品国产日韩91久久久久久| 粉嫩aⅴ一区二区三区四区| 天天色天天操综合| 最新日韩av在线| 国产日韩精品久久久| 日韩欧美一二三四区| 欧美一区二区三区婷婷月色| 色综合婷婷久久| 色婷婷亚洲一区二区三区| 色综合天天视频在线观看| 久久电影网电视剧免费观看| 国产精品一区专区| 精久久久久久久久久久| 国产精品羞羞答答xxdd| 国产原创一区二区三区| 国产一区二区三区美女| 精品一区二区在线免费观看| 国产麻豆欧美日韩一区| 亚洲乱码精品一二三四区日韩在线| 亚洲欧美偷拍三级| 亚洲综合久久久| 麻豆视频观看网址久久| 国产一区二区三区精品视频| 成人爱爱电影网址| 国产成人综合在线观看| 在线观看区一区二| 91麻豆精品国产91久久久使用方法| 青青草一区二区三区| 三级久久三级久久| 三级久久三级久久久| 一本大道久久精品懂色aⅴ| 久久久久久久免费视频了| 美国三级日本三级久久99| 欧美老女人第四色| 亚洲男女毛片无遮挡|