Skip to contentSkip to conversation

strcmp.3: tfix

PATCH In review Štěpán Němec 2 participants 4 messages May 22, 2021 – May 23, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 strcmp.3: tfix

With a single backslash, '\0' ended up as ' ' in the man output.

---
 man3/strcmp.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man3/strcmp.3 +1 -1
index c1992c18427c..469c9b6947d1 100644
@@ -143,7 +143,7 @@ First, some examples using
 .EX
 $ \fB./string_comp ABC ABC\fP
 <str1> and <str2> are equal
-$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\0\(aq = 67
+$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\\0\(aq = 67
 <str1> is greater than <str2> (67)
 $ \fB./string_comp ABA ABZ\fP     # \(aqA\(aq is ASCII 65; \(aqZ\(aq is ASCII 90
 <str1> is less than <str2> (\-25)

base-commit: 65dfda3dd16da5cff236c4a84532ec40d7533578

Signature · 1 line
2.31.1
#1 lore raw

Hi Štěpán,

Quoted 3 lines · Štěpán Němec

With a single backslash, '\0' ended up as ' ' in the man output.

Patch applied.

Thanks,

Alex

Quoted 20 lines
---
  man3/strcmp.3 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
man3/strcmp.3 +1 -1
index c1992c18427c..469c9b6947d1 100644
@@ -143,7 +143,7 @@ First, some examples using
  .EX
  $ \fB./string_comp ABC ABC\fP
  <str1> and <str2> are equal
-$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\0\(aq = 67
+$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\\0\(aq = 67
  <str1> is greater than <str2> (67)
  $ \fB./string_comp ABA ABZ\fP     # \(aqA\(aq is ASCII 65; \(aqZ\(aq is ASCII 90
  <str1> is less than <str2> (\-25)

base-commit: 65dfda3dd16da5cff236c4a84532ec40d7533578

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#2 lore raw

Hi Štěpán,

Quoted 8 lines · Alejandro Colomar (man-pages)

Hi Štěpán,

Quoted 3 lines · Štěpán Němec

With a single backslash, '\0' ended up as ' ' in the man output.

Patch applied.

D'oh, I forgot. We use \e to specify the escape character (see commit message of d1a719857b7eb68f5e5c1c965089038dee683240).

I dropped the patch and applied the following:

strcmp.3: tfix

With a simple backslash, '\0' ended up as ' ' in the man output.

man3/strcmp.3 +1 -1
index c1992c184..3c5a5a6ad 100644
@@ -143,7 +143,7 @@ First, some examples using
 .EX
 $ \fB./string_comp ABC ABC\fP
 <str1> and <str2> are equal
-$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\0\(aq = 67
+$ \fB./string_comp ABC AB\fP      # \(aqC\(aq is ASCII 67; \(aqC\(aq \- \(aq\e0\(aq = 67
 <str1> is greater than <str2> (67)
 $ \fB./string_comp ABA ABZ\fP     # \(aqA\(aq is ASCII 65; \(aqZ\(aq 

is ASCII 90
<str1> is less than <str2> (\-25)

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#3 lore raw
Quoted 7 lines · On Sun, 23 May 2021 12:50:21 +0200 Alejandro Colomar wrote:
Quoted 4 lines · Štěpán Němec
Quoted 1 line

With a single backslash, '\0' ended up as ' ' in the man output.

Patch applied.

D'oh, I forgot. We use \e to specify the escape character (see commit message of d1a719857b7eb68f5e5c1c965089038dee683240).

Oh, I should have noticed the usage in the very same man page...

Thank you for the reference, too.

Quoted 1 line

I dropped the patch and applied the following:

Thanks!

Signature · 1 line
Štěpán