Xinqi Bao's Git
projects
/
slock.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Added tag 0.1 for changeset 0a95c73c7374fbc2342b6040d9f35ddf597729e1
[slock.git]
/
slock.c
diff --git
a/slock.c
b/slock.c
index
866400d
..
0f4c3cc
100644
(file)
--- a/
slock.c
+++ b/
slock.c
@@
-1,7
+1,7
@@
/* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
/* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
* See LICENSE file for license details.
*/
-#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE
500
#if HAVE_SHADOW_H
#include <shadow.h>
#if HAVE_SHADOW_H
#include <shadow.h>
@@
-9,6
+9,7
@@
#include <pwd.h>
#endif
#include <pwd.h>
#endif
+#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@
-22,13
+23,13
@@
int
main(int argc, char **argv) {
char curs[] = {0, 0, 0, 0, 0, 0, 0, 0};
char buf[32], passwd[256];
main(int argc, char **argv) {
char curs[] = {0, 0, 0, 0, 0, 0, 0, 0};
char buf[32], passwd[256];
- int num,
prev_nitem,
screen;
+ int num, screen;
#if HAVE_SHADOW_H
struct spwd *sp;
#else
struct passwd *pw;
#endif
#if HAVE_SHADOW_H
struct spwd *sp;
#else
struct passwd *pw;
#endif
- unsigned int
i,
len;
+ unsigned int len;
Bool running = True;
Cursor invisible;
Display *dpy;
Bool running = True;
Cursor invisible;
Display *dpy;
@@
-90,17
+91,6
@@
main(int argc, char **argv) {
|| IsMiscFunctionKey(ksym) || IsPFKey(ksym)
|| IsPrivateKeypadKey(ksym))
continue;
|| IsMiscFunctionKey(ksym) || IsPFKey(ksym)
|| IsPrivateKeypadKey(ksym))
continue;
- /* first check if a control mask is omitted */
- if(ev.xkey.state & ControlMask) {
- switch (ksym) {
- case XK_h:
- case XK_H: ksym = XK_BackSpace;
- break;
- case XK_u:
- case XK_U: passwd[0] = 0;
- continue;
- }
- }
switch(ksym) {
case XK_Return:
#if HAVE_SHADOW_H
switch(ksym) {
case XK_Return:
#if HAVE_SHADOW_H