X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Ffilelock.c;h=44a4f4367f47ccf139f1f39baa766227f4f233f1;hp=96ee76d625273d0420dadc78f4e763f4a17f6835;hb=35adcaaeafb1fe93eaf00c39b48619e8f188ff3f;hpb=74f1ef06d302e2f5b0c048e3249bd6f3fc7e5922 diff --git a/src/filelock.c b/src/filelock.c index 96ee76d..44a4f43 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -157,9 +157,6 @@ lock_file_1 (char *lfname,int force) static int current_lock_owner (lock_info_type *owner, char *lfname) { -#ifndef index - extern char *rindex (), *index (); -#endif int o, p, len, ret; int local_owner = 0; char *at, *dot; @@ -195,8 +192,8 @@ current_lock_owner (lock_info_type *owner, char *lfname) /* Parse USER@HOST.PID. If can't parse, return -1. */ /* The USER is everything before the first @. */ - at = index (lfinfo, '@'); - dot = rindex (lfinfo, '.'); + at = strchr (lfinfo, '@'); + dot = strrchr (lfinfo, '.'); if (!at || !dot) { xfree (lfinfo); return -1;