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

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

?? rfsel.c

?? 十七種模擬器源代碼 非常有用的作課程設計不可缺少的
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*         ______   ___    ___  *        /\  _  \ /\_ \  /\_ \  *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___  *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\ *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \ *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ *                                           /\____/ *                                           \_/__/ * *      The file selector. * *      By Shawn Hargreaves. * *      Guilherme Silveira and Theuzifan Sumachingun both independently  *      modified it to only list valid drive letters. * *      Peter Pavlovic modified it not to list the logical drives, such *      as the b: drive assigned as a logical drive for a: on single *      floppy disk drive equipped systems and improved the browsing *      through directories. * *      Peter Wang and Eric Botcazou modified it to stretch to screen and *      font sizes. * *      See readme.txt for copyright information. */#include <allegro.h>// These 2 files must be included before raine.h because of a collision !!!#if defined ALLEGRO_WINDOWS   #include "winalleg.h"#endif#include <errno.h>#include <stdlib.h>#include <string.h>#ifndef RAINE_UNIX#ifndef RAINE_WIN32#include <unistd.h>#endif#endif#include <sys/stat.h>#include <limits.h>#include <ctype.h>#include <fcntl.h>#ifdef DJGPP#include <dir.h>#endif#include "raine.h"#include "rgui.h"#include "rguiproc.h"#ifndef _USE_LFN#define _USE_LFN  0#endif#if (DEVICE_SEPARATOR != 0) && (DEVICE_SEPARATOR != '\0')   #define HAVE_DIR_LIST#endifstatic int fs_edit_proc(int, DIALOG *, int );static int fs_flist_proc(int, DIALOG *, int );static char *fs_flist_getter(int, int *);#ifdef HAVE_DIR_LISTstatic int fs_dlist_proc(int, DIALOG *, int );static char *fs_dlist_getter(int, int *);#endif#define FLIST_SIZE      2048typedef struct FLIST{   char dir[512];   int size;   char *name[FLIST_SIZE];} FLIST;static FLIST *flist = NULL;static char updir[1024];static char *fext = NULL;DIALOG file_selector[] ={#ifdef HAVE_DIR_LIST   /* (dialog proc)     (x)   (y)   (w)   (h)   (fg)  (bg)  (key) (flags)  (d1)  (d2)  (dp) */   { d_raine_window_proc,0,   0,    305,  161,  GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  0,    0,       0,    0,    NULL },   { x_ctext_proc,      152,  1,    1,    1,    GUI_COL_TEXT_1,    GUI_BOX_COL_MIDDLE,    0,    0,       0,    0,    NULL,             NULL, NULL  },   { x_raine_button_proc,8,   128,  48,   16,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  'O',  D_EXIT,  0,    0,    "&Okay" },   { x_raine_button_proc,64,  128,  48,   16,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  27,   D_EXIT,  0,    0,    "Cancel" },   { fs_edit_proc,      8,    116,  248,  8,    GUI_COL_TEXT_1,  253,  0,    0,       79,   0,    NULL },   { fs_flist_proc,     80,   20,   176,  92,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  0,    D_EXIT,  0,    0,    fs_flist_getter },   { fs_dlist_proc,     8,    20,   64,   92,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  0,    D_EXIT,  0,    0,    fs_dlist_getter },   { d_yield_proc,      0,    0,    0,    0,    0,    0,    0,    0,       0,    0,    NULL,             NULL, NULL  },#else   { d_raine_window_proc,0,   0,    305,  161,  GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  0,    0,       0,    0,    NULL },   { x_ctext_proc,      152,  1,    1,    1,    GUI_COL_TEXT_1,    GUI_BOX_COL_MIDDLE,    0,    0,       0,    0,    NULL,             NULL, NULL  },   { x_raine_button_proc,8,   128,  48,   16,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  'O',  D_EXIT,  0,    0,    "&Okay" },   { x_raine_button_proc,64,  128,  48,   16,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  27,   D_EXIT,  0,    0,    "Cancel" },   { fs_edit_proc,      8,    116,  248,  8,    GUI_COL_TEXT_1,  253,  0,    0,       79,   0,    NULL },   { fs_flist_proc,     80,   20,   176,  92,   GUI_COL_TEXT_1,  GUI_BOX_COL_MIDDLE,  0,    D_EXIT,  0,    0,    fs_flist_getter },   { d_yield_proc,      0,    0,    0,    0,    0,    0,    0,    0,       0,    0,    NULL,             NULL, NULL  },#endif   { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }};#define FS_FRAME	0#define FS_MESSAGE      1#define FS_OK           2#define FS_CANCEL       3#define FS_EDIT         4#define FS_FILES        5#ifdef HAVE_DIR_LIST       /* not all platforms need a directory list */#define FS_DISKS        6#define FS_YIELD        7/* drive_exists: *  Checks whether the specified drive is valid. */static int drive_exists(int x){   #ifdef ALLEGRO_DOS      /* DOS implementation */      unsigned int old;      int ret = FALSE;      __dpmi_regs r;      /* get actual drive */      r.h.ah = 0x19;      __dpmi_int(0x21, &r);      old = r.h.al;      /* see if drive x is assigned as a valid drive */      r.h.ah = 0x0E;      r.h.dl = x;      __dpmi_int(0x21, &r);      r.h.ah = 0x19;      __dpmi_int(0x21, &r);      if (r.h.al == x) {	 /* ok, now check if it is a logical drive or not... */	 r.x.ax = 0x440E;	 r.h.bl = x+1;	 __dpmi_int(0x21, &r);	 if ((r.x.flags & 1) ||        /* call failed */	     (r.h.al == 0) ||          /* has no logical drives */	     (r.h.al == (x+1)))        /* not a logical drive */	    ret = TRUE;      }      /* now we set the old drive */      r.h.ah = 0x0E;      r.h.dl = old;      __dpmi_int(0x21, &r);      return ret;   #elif defined ALLEGRO_WINDOWS      /* Windows implementation */      return GetLogicalDrives() & (1 << x);   #elif defined ALLEGRO_MPW      /* MacOs implementation */      return GetLogicalDrives() & (1 << x);   #else      /* unknown platform */      return TRUE;   #endif}/* count_disks: *  Counts the number of valid drives. */static int count_disks(){   int c, i;   c = 0;   for (i=0; i<26; i++)      if (drive_exists(i))	 c++;   return c;}/* get_x_drive: *  Returns the drive letter matching the specified list index. */static int get_x_drive(int index){   int c, i;   c = 0;   for (i=0; i<26; i++) {      if (drive_exists(i)) {	 c++;	 if (c==index)	    return i;      }   }   return -1;}/* fs_dlist_getter: *  Listbox data getter routine for the file selector disk list. */static char *fs_dlist_getter(int index, int *list_size){   static char d[8];   int pos, c;   if (index < 0) {      if (list_size)	 *list_size = count_disks();      return NULL;   }   c = 'A' + get_x_drive(index+1);   if ((c < 'A') || (c > 'Z'))      c = 'C';   pos = usetc(d, c);   pos += usetc(d+pos, DEVICE_SEPARATOR);   pos += usetc(d+pos, OTHER_PATH_SEPARATOR);   usetc(d+pos, 0);   return d;}/* fs_dlist_proc: *  Dialog procedure for the file selector disk list. */static int fs_dlist_proc(int msg, DIALOG *d, int c){   char *s = file_selector[FS_EDIT].dp;   int ret, i, temp;   if (msg == MSG_START) {      d->d1 = d->d2 = 0;      temp = utoupper(ugetc(s));      if (((temp >= 'A') && (temp <= 'Z')) && (ugetat(s, 1) == DEVICE_SEPARATOR)) {	 temp -= 'A';	 for (i=0; i<temp; i++)	    if (drive_exists(i))	       d->d1++;      }   }   ret = d_text_list_proc(msg, d, c);   if (ret == D_CLOSE) {      temp = 'A' + get_x_drive(d->d1+1);      if ((temp < 'A') || (temp > 'Z'))	 temp = 'C';      s += usetc(s, temp);      s += usetc(s, DEVICE_SEPARATOR);      s += usetc(s, OTHER_PATH_SEPARATOR);      usetc(s, 0);      scare_mouse();      SEND_MESSAGE(file_selector+FS_FILES, MSG_START, 0);      SEND_MESSAGE(file_selector+FS_FILES, MSG_DRAW, 0);      SEND_MESSAGE(file_selector+FS_EDIT, MSG_START, 0);      SEND_MESSAGE(file_selector+FS_EDIT, MSG_DRAW, 0);      unscare_mouse();      return D_O_K;   }   return ret;}#else#define FS_YIELD        6#endif      /* HAVE_DIR_LIST *//* fs_edit_proc: *  Dialog procedure for the file selector editable string. */static int fs_edit_proc(int msg, DIALOG *d, int c){   char *s = d->dp;   int list_size;   int found = 0;   char b[512];   int ch, attr;   int i;   if (msg == MSG_START) {      fix_filename_path(b, s, sizeof(b));      ustrcpy(s, b);   }   if (msg == MSG_KEY) {      if ((!ugetc(s)) || (ugetat(s, -1) == DEVICE_SEPARATOR))	 ustrcat(s, uconvert_ascii("./", NULL));      fix_filename_path(b, s, sizeof(b));      ustrcpy(s, b);      ch = ugetat(s, -1);      if ((ch != '/') && (ch != OTHER_PATH_SEPARATOR)) {	 if (file_exists(s, FA_RDONLY | FA_HIDDEN | FA_DIREC, &attr)) {	    if (attr & FA_DIREC)	       put_backslash(s);	    else	       return D_CLOSE;	 }	 else	    return D_CLOSE;      }      scare_mouse();      SEND_MESSAGE(file_selector+FS_FILES, MSG_START, 0);      /* did we `cd ..' ? */      if (ustrlen(updir)) {	 /* now we have to find a directory name equal to updir */	 for (i = 0; i<flist->size; i++) {	    if (!ustrcmp(updir, flist->name[i])) {  /* we got it ! */	       file_selector[FS_FILES].d1 = i;	       /* we have to know the number of visible lines in the filelist */	       /* -1 to avoid an off-by-one problem */               list_size = (file_selector[FS_FILES].h-4) / text_height(font) - 1;               if (i>list_size)		  file_selector[FS_FILES].d2 = i-list_size;	       else		  file_selector[FS_FILES].d2 = 0;               found = 1;	       break;  /* ok, our work is done... */	    }	 }	 /* by some strange reason, we didn't find the old directory... */         if (!found) {            file_selector[FS_FILES].d1 = 0;            file_selector[FS_FILES].d2 = 0;         }      }      /* and continue... */      SEND_MESSAGE(file_selector+FS_FILES, MSG_DRAW, 0);      SEND_MESSAGE(d, MSG_START, 0);      SEND_MESSAGE(d, MSG_DRAW, 0);      unscare_mouse();      return D_O_K;   }   if (msg == MSG_UCHAR) {      if ((c >= 'a') && (c <= 'z')) {	 if (!ALLEGRO_LFN)	    c = utoupper(c);      }      else if (c == '/') {	 c = OTHER_PATH_SEPARATOR;      }      else if (ALLEGRO_LFN) {	 if ((c > 127) || (c < 32))	    return D_O_K;      }      else {	 if ((c != OTHER_PATH_SEPARATOR) && (c != '_') &&	     (c != DEVICE_SEPARATOR) && (c != '.') &&	     ((c < 'A') || (c > 'Z')) && ((c < '0') || (c > '9')))	    return D_O_K;      }   }   return x_edit_proc(msg, d, c); }/* ustrfilecmp: *  ustricmp for filenames: makes sure that eg "foo.bar" comes before *  "foo-1.bar", and also that "foo9.bar" comes before "foo10.bar". */static int ustrfilecmp(AL_CONST char *s1, AL_CONST char *s2){   int c1, c2;   int x1, x2;   char *t1, *t2;   for (;;) {      c1 = utolower(ugetxc(&s1));      c2 = utolower(ugetxc(&s2));      if ((c1 >= '0') && (c1 <= '9') && (c2 >= '0') && (c2 <= '9')) {	 x1 = ustrtol(s1 - ucwidth(c1), &t1, 10);	 x2 = ustrtol(s2 - ucwidth(c2), &t2, 10);	 if (x1 != x2)	    return x1 - x2;	 else if (t1 - s1 != t2 - s2)	    return (t2 - s2) - (t1 - s1);	 s1 = t1;	 s2 = t2;      }      else if (c1 != c2) {	 if (!c1)	    return -1;	 else if (!c2)	    return 1;	 else if (c1 == '.')	    return -1;	 else if (c2 == '.')	    return 1;	 return c1 - c2;      }      if (!c1)	 return 0;   }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文天堂在线一区| 欧美成人一区二区三区在线观看| 久久日韩粉嫩一区二区三区| 日本美女一区二区三区视频| 精品少妇一区二区三区在线视频| 久久精品久久精品| 久久九九国产精品| 色先锋久久av资源部| 亚洲另类一区二区| 91精品国产色综合久久不卡电影 | 国产精品午夜春色av| 成人av资源在线| 亚洲综合自拍偷拍| 日韩免费一区二区| 成人免费视频国产在线观看| 亚洲日本一区二区| 日韩一级精品视频在线观看| 国产91在线|亚洲| 亚洲成人你懂的| 2022国产精品视频| 91免费国产在线| 日本va欧美va瓶| 国产精品人成在线观看免费| 91国偷自产一区二区三区成为亚洲经典 | 亚洲一区二区av电影| 99国产精品一区| 五月激情六月综合| 欧美激情自拍偷拍| 欧美三级乱人伦电影| 国产精品99久久久| 亚洲一区二区三区国产| 精品成人一区二区三区四区| www.成人网.com| 日日夜夜免费精品| 亚洲四区在线观看| 精品国产a毛片| 欧美日韩综合在线| 成人高清免费观看| 老司机午夜精品| 亚洲午夜久久久久| 国产精品色在线观看| 欧美一区二区三区在线观看视频 | 亚洲在线中文字幕| 国产亚洲综合在线| 在线不卡的av| 在线欧美日韩精品| 成人小视频免费在线观看| 日日噜噜夜夜狠狠视频欧美人| 国产精品毛片a∨一区二区三区| 91精品国产综合久久精品app| 99久久精品免费观看| 国产裸体歌舞团一区二区| 天堂在线一区二区| 一区二区三区在线观看国产| 国产偷v国产偷v亚洲高清| 日韩一级完整毛片| 欧美日韩国产区一| 在线视频一区二区三区| 成人高清伦理免费影院在线观看| 黄色小说综合网站| 老色鬼精品视频在线观看播放| 亚洲国产一区二区三区青草影视| 《视频一区视频二区| 中文成人综合网| 日本一区二区视频在线观看| 欧美成人三级电影在线| 日韩一区二区三区四区| 69堂国产成人免费视频| 欧美狂野另类xxxxoooo| 欧美日韩国产综合草草| 在线国产电影不卡| 色综合久久天天| 91免费看片在线观看| 91丨九色丨国产丨porny| 成人深夜视频在线观看| 成人一级黄色片| 成人国产精品免费观看动漫| 国产91精品一区二区麻豆网站 | 日产国产高清一区二区三区| 亚洲一区二区三区美女| 午夜视频一区在线观看| 天天色天天操综合| 日本不卡一二三| 九色综合国产一区二区三区| 激情图区综合网| 国产成人亚洲综合色影视 | 一道本成人在线| 欧美亚洲综合在线| 91精品麻豆日日躁夜夜躁| 欧美一级淫片007| 久久亚洲综合色| 国产精品伦一区二区三级视频| 国产精品美女久久久久aⅴ国产馆| 国产精品国产馆在线真实露脸 | 成人黄色免费短视频| 色婷婷av久久久久久久| 欧美日韩国产免费一区二区| 日韩欧美一二区| 国产精品婷婷午夜在线观看| 亚洲精品视频观看| 日韩精品一卡二卡三卡四卡无卡| 久久成人免费日本黄色| 国产福利一区二区三区在线视频| av福利精品导航| 欧美日韩国产精品自在自线| 欧美xxxxxxxx| 亚洲精品亚洲人成人网在线播放| 亚洲.国产.中文慕字在线| 久久99精品国产.久久久久| 粉嫩嫩av羞羞动漫久久久| 在线观看免费亚洲| 26uuu国产电影一区二区| 亚洲靠逼com| 免费观看在线色综合| 成人av网站大全| 欧美一区二区女人| 国产精品伦理一区二区| 亚洲地区一二三色| 国产一区二区三区免费在线观看| 色婷婷综合久色| 久久蜜桃一区二区| 亚洲国产成人tv| 国产成人精品午夜视频免费| 欧美日韩一区精品| 日本一区二区成人在线| 全部av―极品视觉盛宴亚洲| 波多野结衣在线一区| 91精品国产91综合久久蜜臀| 亚洲欧洲av色图| 裸体健美xxxx欧美裸体表演| a级高清视频欧美日韩| 日韩一级黄色片| 亚洲综合另类小说| 不卡的av在线| 久久先锋资源网| 蜜乳av一区二区| 欧美天天综合网| 亚洲人成网站色在线观看| 九九热在线视频观看这里只有精品| 色婷婷综合久久久久中文一区二区 | 精品国产露脸精彩对白| 亚洲国产欧美在线| 91在线码无精品| 久久一夜天堂av一区二区三区| 视频一区欧美精品| 欧美亚洲综合在线| 一区二区三区在线不卡| 99久久国产综合精品麻豆| 精品国产百合女同互慰| 视频一区视频二区中文字幕| 在线观看亚洲成人| 亚洲视频图片小说| 99在线精品观看| 国产精品免费免费| 大尺度一区二区| 欧美国产精品专区| 国产成人精品亚洲日本在线桃色 | 蜜臀a∨国产成人精品| 欧美老年两性高潮| 一区二区三区影院| 色哟哟在线观看一区二区三区| 亚洲欧美在线视频观看| 成人免费视频视频在线观看免费| 久久久www免费人成精品| 国产一区不卡在线| 久久久久久99精品| 国产成人av一区二区三区在线 | 狠狠色丁香久久婷婷综合_中| 日韩一区二区在线观看视频播放| 日韩精品视频网站| 91精品国产高清一区二区三区蜜臀 | 色综合久久99| 一区二区三区在线观看欧美| 91福利国产成人精品照片| 亚洲一区二区综合| 欧美日本视频在线| 欧美aa在线视频| 久久精品一区八戒影视| 成人精品视频.| 亚洲男人的天堂在线aⅴ视频| 91成人在线观看喷潮| 亚洲电影激情视频网站| 欧美精品日韩一本| 久久99久久精品| 国产精品欧美精品| 欧美系列在线观看| 人人精品人人爱| 欧美韩国一区二区| 在线免费不卡电影| 狂野欧美性猛交blacked| 国产欧美精品国产国产专区| 99re热视频精品| 天天综合网天天综合色| 久久看人人爽人人| 91网站最新网址| 日本午夜一区二区| 中文字幕欧美日本乱码一线二线| 91久久免费观看| 久久99久久精品| 亚洲老妇xxxxxx|