From e02ac9d874accb48b6f0b52cc8025e9e305caf24 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Mar 2007 11:17:17 +0000 Subject: [PATCH] Note that the GNU/Linux manpage for strtok claims that it uses a static buffer, which is wrong. --- ta-advice/HW2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ta-advice/HW2 b/ta-advice/HW2 index 7a79395..95049b3 100644 --- a/ta-advice/HW2 +++ b/ta-advice/HW2 @@ -102,6 +102,16 @@ A3: parsing. This is wrong: it modifies the string provided and stores a pointer into it statically. + However, the manpage for on GNU/Linux (at least) says that + strtok uses a static buffer. That's wrong. So don't + penalize students who repeat that claim. Instead, please + add a note, such as: + + Although some manpages for strtok do claim that strtok + uses a static buffer, this is incorrect. strtok uses a + user-provided buffer and statically stores a pointer + into that buffer. + A4: Some correct answers: -- 2.30.2