Changeset 2995 for neercs/trunk/src/lock.c
- Timestamp:
- Oct 18, 2008, 11:47:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/lock.c
r2627 r2995 19 19 #include <stdlib.h> 20 20 #include <string.h> 21 #include <c ucul.h>21 #include <caca.h> 22 22 #include <caca.h> 23 23 #include <time.h> … … 93 93 unsigned int i; 94 94 char buffer[1024]; 95 c ucul_canvas_t *cv = screen_list->cv;95 caca_canvas_t *cv = screen_list->cv; 96 96 97 97 gethostname(buffer, sizeof(buffer)-1); 98 98 99 99 int w = 65, h = 20; 100 int x = (c ucul_get_canvas_width(cv) - w) / 2;101 int y = (c ucul_get_canvas_height(cv) - h) / 2;102 103 104 c ucul_set_color_ansi(cv, CUCUL_BLUE, CUCUL_BLUE);105 c ucul_fill_box(cv,100 int x = (caca_get_canvas_width(cv) - w) / 2; 101 int y = (caca_get_canvas_height(cv) - h) / 2; 102 103 104 caca_set_color_ansi(cv, CACA_BLUE, CACA_BLUE); 105 caca_fill_box(cv, 106 106 x, y, 107 107 w, h, '#'); 108 c ucul_set_color_ansi(cv, CUCUL_DEFAULT, CUCUL_BLUE);109 c ucul_draw_cp437_box(cv,108 caca_set_color_ansi(cv, CACA_DEFAULT, CACA_BLUE); 109 caca_draw_cp437_box(cv, 110 110 x, y, 111 111 w, h); … … 113 113 x+=2; 114 114 y++; 115 c ucul_printf(cv,116 (c ucul_get_canvas_width(cv) - strlen(PACKAGE_STRING " locked")) / 2,115 caca_printf(cv, 116 (caca_get_canvas_width(cv) - strlen(PACKAGE_STRING " locked")) / 2, 117 117 y-1, 118 118 PACKAGE_STRING " locked"); 119 119 120 c ucul_printf(cv, x, y++, "Please type in your password for %s@%s :", getenv("USER"), buffer);120 caca_printf(cv, x, y++, "Please type in your password for %s@%s :", getenv("USER"), buffer); 121 121 y+=2; 122 122 123 x = (c ucul_get_canvas_width(cv)/2) - ((strlen(screen_list->lockpass) / 2) + strlen("Password : "));124 c ucul_printf(cv, x, y, "Password : ");123 x = (caca_get_canvas_width(cv)/2) - ((strlen(screen_list->lockpass) / 2) + strlen("Password : ")); 124 caca_printf(cv, x, y, "Password : "); 125 125 x+=strlen("Password : "); 126 126 for(i=0; i<strlen(screen_list->lockpass); i++) 127 127 { 128 c ucul_put_str(cv, x, y, "*");128 caca_put_str(cv, x, y, "*"); 129 129 x++; 130 130 } … … 133 133 if(strlen(screen_list->lockmsg)) 134 134 { 135 x = ((c ucul_get_canvas_width(cv) - w) / 2) + (strlen(screen_list->lockmsg));135 x = ((caca_get_canvas_width(cv) - w) / 2) + (strlen(screen_list->lockmsg)); 136 136 y+=2; 137 c ucul_set_color_ansi(cv, CUCUL_RED, CUCUL_BLUE);138 c ucul_printf(cv, x, y, "Error : %s", screen_list->lockmsg);137 caca_set_color_ansi(cv, CACA_RED, CACA_BLUE); 138 caca_printf(cv, x, y, "Error : %s", screen_list->lockmsg); 139 139 } 140 140 #endif
Note: See TracChangeset
for help on using the changeset viewer.