Remove --lock option

reverse-branch
Martin Duquesnoy 17 years ago
parent 029bf18cfd
commit cea988b3f0
  1. 12
      ttyclock.c
  2. 1
      ttyclock.h

@ -309,10 +309,14 @@ void
set_center(Bool b) set_center(Bool b)
{ {
if((ttyclock->option.center = b)) if((ttyclock->option.center = b))
{
ttyclock->option.rebound = False;
clock_move((ttyclock->geo.x = (LINES / 2 - (ttyclock->geo.h / 2))), clock_move((ttyclock->geo.x = (LINES / 2 - (ttyclock->geo.h / 2))),
(ttyclock->geo.y = (COLS / 2 - (ttyclock->geo.w / 2))), (ttyclock->geo.y = (COLS / 2 - (ttyclock->geo.w / 2))),
ttyclock->geo.w, ttyclock->geo.w,
ttyclock->geo.h); ttyclock->geo.h);
}
return; return;
} }
@ -320,8 +324,6 @@ set_center(Bool b)
void void
key_event(void) key_event(void)
{ {
if(ttyclock->option.keylock)
return;
halfdelay(1); halfdelay(1);
@ -406,7 +408,6 @@ main(int argc, char **argv)
{"second", 0, NULL, 's'}, {"second", 0, NULL, 's'},
{"twelve", 0, NULL, 't'}, {"twelve", 0, NULL, 't'},
{"rebound", 0, NULL, 'r'}, {"rebound", 0, NULL, 'r'},
{"lock", 0, NULL, 'l'},
{"center", 0, NULL, 'c'}, {"center", 0, NULL, 'c'},
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
@ -414,7 +415,7 @@ main(int argc, char **argv)
/* Alloc ttyclock */ /* Alloc ttyclock */
ttyclock = malloc(sizeof(ttyclock_t)); ttyclock = malloc(sizeof(ttyclock_t));
while ((c = getopt_long(argc,argv,"tvslrcih", while ((c = getopt_long(argc,argv,"tvsrcih",
long_options, NULL)) != -1) long_options, NULL)) != -1)
{ {
switch(c) switch(c)
@ -447,9 +448,6 @@ main(int argc, char **argv)
case 'r': case 'r':
ttyclock->option.rebound = True; ttyclock->option.rebound = True;
break; break;
case 'l':
ttyclock->option.keylock = True;
break;
} }
} }

@ -52,7 +52,6 @@
/* Help string */ /* Help string */
#define HELPSTR "tty-clock usage : tty-clock [-option] <arg> \n\ #define HELPSTR "tty-clock usage : tty-clock [-option] <arg> \n\
-s, --second Show seconds \n\ -s, --second Show seconds \n\
-l, --lock Lock the keyboard \n\
-c, --center Set the clock at the center of the terminal \n\ -c, --center Set the clock at the center of the terminal \n\
-t, --twelve Set the hour in 12h format \n\ -t, --twelve Set the hour in 12h format \n\
-r, --rebound Do rebound the clock \n\ -r, --rebound Do rebound the clock \n\

Loading…
Cancel
Save