Mercurial > hg > xemacs-beta
diff src/filelock.c @ 382:064ab7fed2e0 r21-2-6
Import from CVS: tag r21-2-6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:39 +0200 |
parents | 6240c7796c7a |
children | 74fd4e045ea6 |
line wrap: on
line diff
--- a/src/filelock.c Mon Aug 13 11:07:11 2007 +0200 +++ b/src/filelock.c Mon Aug 13 11:07:39 2007 +0200 @@ -157,9 +157,6 @@ 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 @@ /* 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;