On 09/08/10 16:00, Bruce Dubbs wrote:
> Andrew Benton wrote:
>> sed -i 's/getline /get_line /' lib/getline.{c,h}
>
> It might work, but that changes more than what is needed.
>
> $ cat getline.c
> getline.c  getline.h  getline.o
> bdu...@lfs6:/usr/src/cvs/cvs-1.11.23/lib$ cat getline.h
> #ifndef _getline_h_
> #define _getline_h_ 1
>
> #include<stdio.h>
>
> #if defined (__GNUC__) || (defined (__STDC__)&&  __STDC__)
> #define __PROTO(args) args
> #else
> #define __PROTO(args) ()
> #endif  /* GCC.  */
>
> #define GETLINE_NO_LIMIT -1
>
> int
>     getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
> int
>     getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
>                            int limit));
> int
>     getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
>                      int _terminator, int _offset, int limit));
>
> #endif /* _getline_h_ */
>
> You would also have to change the filename.
>

No, the sed only changes the word getline followed by a space. getline.h is
unaltered as it doesn't match the regex.

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to