Remove unused code

pull/4/head
Moritz Luedecke 7 years ago
parent dbe3d0cfd9
commit a1e86f9bb1

@ -135,19 +135,13 @@ insert(const char *str, ssize_t n) {
static void static void
drawwin(void) { drawwin(void) {
unsigned int curpos; unsigned int curpos;
int x = 0, wb = 0, pb = 0, pbw, i; int x = 0, pb = 0, pbw, i;
size_t asterlen = strlen(asterisk); size_t asterlen = strlen(asterisk);
size_t pdesclen; size_t pdesclen;
char* censort = ecalloc(1, asterlen * sizeof(text)); char* censort = ecalloc(1, asterlen * sizeof(text));
unsigned int censortl = minpwlen * TEXTW(asterisk) / strlen(asterisk); unsigned int censortl = minpwlen * TEXTW(asterisk) / strlen(asterisk);
unsigned int confirml = TEXTW(" YesNo ") + 3 * lrpad; unsigned int confirml = TEXTW(" YesNo ") + 3 * lrpad;
#if 0
/* TODO: Code from first pintenry-demnu version */
char *sectext = malloc(sizeof (char) * 2048);
int seccursor = 0;
int n;
#endif
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, 0, 0, mw, mh, 1, 1); drw_rect(drw, 0, 0, mw, mh, 1, 1);
@ -189,25 +183,13 @@ drawwin(void) {
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
if (winmode == WinPin) { if (winmode == WinPin) {
#if 0
/* TODO: Code from first pintenry-demnu version */
drw_text(drw, x, 0, mw, bh, lrpad / 2, censort, 0);
drw_font_getexts(drw->fonts, sectext, seccursor, &curpos, NULL);
curpos += bh / 2 - 2;
if (curpos < w) {
drw_rect(drw, x + curpos + 2, 0 + 2, 1, bh - 4, 1, 0);
}
#else
for (i = 0; i < asterlen * strlen(text); i += asterlen) { for (i = 0; i < asterlen * strlen(text); i += asterlen) {
memcpy(&censort[i], asterisk, asterlen); memcpy(&censort[i], asterisk, asterlen);
} }
censort[i+1] = '\n'; censort[i+1] = '\n';
// FIXME: Set length
drw_text(drw, x, 0, mw - x - pbw, bh, lrpad / 2, censort, 0); drw_text(drw, x, 0, mw - x - pbw, bh, lrpad / 2, censort, 0);
drw_font_getexts(drw->fonts, censort, cursor * asterlen, &curpos, NULL); drw_font_getexts(drw->fonts, censort, cursor * asterlen, &curpos, NULL);
#endif
free(censort); free(censort);
} else { } else {
x += TEXTW(" "); x += TEXTW(" ");
@ -215,14 +197,6 @@ drawwin(void) {
x = drawitem("Yes", (sel == Yes), x, 0, TEXTW("Yes")); x = drawitem("Yes", (sel == Yes), x, 0, TEXTW("Yes"));
} }
#if 0
/* This is code from the first pinentry-dmenu version */
if ((curpos += lrpad / 2 - 1) < w) {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
}
#endif
drw_map(drw, win, 0, 0, mw, mh); drw_map(drw, win, 0, 0, mw, mh);
} }

Loading…
Cancel
Save