[thirdparty-commits] seanbright: editline/trunk r165 - /editline/trunk/readline.c
SVN commits to the Digium third-party software repository
thirdparty-commits at lists.digium.com
Sat Mar 20 12:39:39 CDT 2010
Author: seanbright
Date: Sat Mar 20 12:39:34 2010
New Revision: 165
URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=165
Log:
OpenBSD doesn't have getpwent_r, but we aren't using the code where it is used, so... see ya!
Modified:
editline/trunk/readline.c
Modified: editline/trunk/readline.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/readline.c?view=diff&rev=165&r1=164&r2=165
==============================================================================
--- editline/trunk/readline.c (original)
+++ editline/trunk/readline.c Sat Mar 20 12:39:34 2010
@@ -42,7 +42,6 @@
#include <stdio.h>
#include <dirent.h>
#include <string.h>
-#include <pwd.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
@@ -1428,40 +1427,6 @@
}
/*
- * a completion generator for usernames; returns _first_ username
- * which starts with supplied text
- * text contains a partial username preceded by random character
- * (usually '~'); state is ignored
- * it's callers responsibility to free returned value
- */
-char *
-username_completion_function(const char *text, int state)
-{
- struct passwd *pwd, pwres;
- char pwbuf[1024];
-
- if (text[0] == '\0')
- return (NULL);
-
- if (*text == '~')
- text++;
-
- if (state == 0)
- setpwent();
-
- while (getpwent_r(&pwres, pwbuf, sizeof(pwbuf), &pwd) == 0
- && pwd != NULL && text[0] == pwd->pw_name[0]
- && strcmp(text, pwd->pw_name) == 0);
-
- if (pwd == NULL) {
- endpwent();
- return (NULL);
- }
- return (strdup(pwd->pw_name));
-}
-
-
-/*
* el-compatible wrapper to send TSTP on ^Z
*/
/* ARGSUSED */
More information about the thirdparty-commits
mailing list