Xinqi Bao's Git
projects
/
slock.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
0f1157d
)
applied Salmi's patch
author
Anselm R. Garbe <
[email protected]
>
Thu, 12 Oct 2006 07:33:38 +0000
(09:33 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Thu, 12 Oct 2006 07:33:38 +0000
(09:33 +0200)
config.mk
diff
|
blob
|
history
slock.c
diff
|
blob
|
history
diff --git
a/config.mk
b/config.mk
index
0333587
..
fd98ccb
100644
(file)
--- a/
config.mk
+++ b/
config.mk
@@
-17,7
+17,7
@@
LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11
# flags
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H
LDFLAGS = ${LIBS}
# flags
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H
LDFLAGS = ${LIBS}
-#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
+#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
-DHAVE_SHADOW_H
#LDFLAGS = -g ${LIBS}
# On *BSD remove -DHAVE_SHADOW_H from CFLAGS
#LDFLAGS = -g ${LIBS}
# On *BSD remove -DHAVE_SHADOW_H from CFLAGS
diff --git
a/slock.c
b/slock.c
index
866400d
..
12c991f
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;