Search
moon
sun

Mandatory Part

Search
ν•¨μˆ˜ 이름
get_next_line
get_next_line.c,Β get_next_line_utils.c,Β get_next_line.h
#1. ν”„λ‘œκ·Έλž¨μ΄ 읽을 파일 λ””μŠ€ν¬λŸ½ν„°(file descriptor for reading) #2. μ½μ–΄μ™”λ˜ κ°’(The value of what has been read)
1 : ν•œ 라인이 μ½ν˜”μ„ λ•Œ(A line has been read) 0 : EOF에 λ„λ‹¬ν–ˆμ„ λ•Œ(EOF has been reached) -1 : μ—λŸ¬κ°€ λ°œμƒν–ˆμ„ λ•Œ(An error happened)
read,Β malloc,Β free
파일 λ””μŠ€ν¬λŸ½ν„°λ‘œλΆ€ν„° 읽어 온 ν•˜λ‚˜μ˜ 라인(newline 없이)을 λ°˜ν™˜ν•˜λŠ” ν•¨μˆ˜ μž‘μ„± Write a function which returns a line read from a file descriptor, without the newline