1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
13 #include "buf_findstr.h"
16 _DEFUN (envz_entry
, (envz
, envz_len
, name
),
21 char *buf_ptr
= (char *)envz
;
22 size_t buf_len
= envz_len
;
26 if (_buf_findstr(name
, &buf_ptr
, &buf_len
))
30 if (*buf_ptr
== '=' || *buf_ptr
== '\0')
34 /* Move buf_ptr back to start of entry. */
35 while(*buf_ptr
!= '\0' && buf_ptr
!= envz
) buf_ptr
--;
40 return (char *)buf_ptr
;