|
|
| version 1.6, 2005/02/09 20:11:36 | version 1.7, 2005/03/20 08:58:19 |
|---|---|
| Line 52 static void vircalendar(HWND hWnd, BOOL | Line 52 static void vircalendar(HWND hWnd, BOOL |
| EnableWindow(GetDlgItem(hWnd, IDC_SETNOW), disp); | EnableWindow(GetDlgItem(hWnd, IDC_SETNOW), disp); |
| } | } |
| static UINT32 getbcd(const OEMCHAR *str, int len) { | static UINT8 getbcd(const OEMCHAR *str, int len) { |
| UINT32 ret; | UINT ret; |
| UINT c; | OEMCHAR c; |
| if (!(*str)) { | |
| return(0xff); | |
| } | |
| ret = 0; | ret = 0; |
| while(len--) { | while(len--) { |
| c = *str++; | c = *str++; |
| Line 70 static UINT32 getbcd(const OEMCHAR *str, | Line 67 static UINT32 getbcd(const OEMCHAR *str, |
| return(0xff); | return(0xff); |
| } | } |
| ret <<= 4; | ret <<= 4; |
| ret |= (UINT8)(c - '0'); | ret |= (UINT)(c - '0'); |
| } | } |
| return(ret); | return((UINT8)ret); |
| } | } |
| LRESULT CALLBACK ClndDialogProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { | LRESULT CALLBACK ClndDialogProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { |
| Line 110 LRESULT CALLBACK ClndDialogProc(HWND hWn | Line 107 LRESULT CALLBACK ClndDialogProc(HWND hWn |
| for (i=0; i<6; i++) { | for (i=0; i<6; i++) { |
| GetDlgItemText(hWnd, vircal[i].res, | GetDlgItemText(hWnd, vircal[i].res, |
| work, NELEMENTS(work)); | work, NELEMENTS(work)); |
| b = (UINT8)getbcd(work, 2); | b = getbcd(work, 2); |
| if ((b >= vircal[i].min) && (b <= vircal[i].max)) { | if ((b >= vircal[i].min) && (b <= vircal[i].max)) { |
| if (i == 1) { | if (i == 1) { |
| b = ((b & 0x10) * 10) + (b << 4); | b = ((b & 0x10) * 10) + (b << 4); |