998-doc-manpages.dpatch 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 998-doc-manpages.dpatch by Michael Piefel <piefel@debian.org>
  3. ##
  4. ## DP: FIXME, and #417511.
  5. @DPATCH@
  6. diff -Naur file-4.20.orig/doc/file.man file-4.20/doc/file.man
  7. --- file-4.20.orig/doc/file.man 2007-01-25 21:05:46.000000000 +0000
  8. +++ file-4.20/doc/file.man 2007-04-03 17:57:01.000000000 +0000
  9. @@ -47,9 +47,8 @@
  10. or non-printable).
  11. Exceptions are well-known file formats (core files, tar archives)
  12. that are known to contain binary data.
  13. -When modifying the file
  14. -.Pa __MAGIC__
  15. -or the program itself, make sure to
  16. +When adding local definitions to
  17. +.Pa /etc/magic ,
  18. .Em "preserve these keywords" .
  19. People depend on knowing that all the readable files in a directory
  20. have the word
  21. @@ -76,17 +75,17 @@
  22. implement them)
  23. are intuited if they are defined in
  24. the system header file
  25. -.In sys/stat.h .
  26. +.Pa sys/stat.h .
  27. .Pp
  28. The magic number tests are used to check for files with data in
  29. particular fixed formats.
  30. The canonical example of this is a binary executable (compiled program)
  31. .Dv a.out
  32. file, whose format is defined in
  33. -.In elf.h ,
  34. -.In a.out.h
  35. +.Pa elf.h ,
  36. +.Pa a.out.h
  37. and possibly
  38. -.In exec.h
  39. +.Pa exec.h
  40. in the standard include directory.
  41. These files have a
  42. .Sq "magic number"
  43. @@ -99,12 +98,14 @@
  44. has been applied by extension to data files.
  45. Any file with some invariant identifier at a small fixed
  46. offset into the file can usually be described in this way.
  47. -The information identifying these files is read from the compiled
  48. +The information identifying these files is read from
  49. +.Pa /etc/magic
  50. +and the compiled
  51. magic file
  52. .Pa __MAGIC__.mgc ,
  53. or
  54. .Pa __MAGIC__
  55. -if the compile file does not exist. In addition
  56. +if the compiled file does not exist. In addition
  57. .Nm
  58. will look in
  59. .Pa $HOME/.magic.mgc ,
  60. @@ -144,7 +145,7 @@
  61. it will
  62. attempt to determine in what language the file is written.
  63. The language tests look for particular strings (cf
  64. -.In names.h
  65. +.Pa names.h
  66. that can appear anywhere in the first few blocks of a file.
  67. For example, the keyword
  68. .Em .br
  69. @@ -161,7 +162,8 @@
  70. archives).
  71. .Pp
  72. Any file that cannot be identified as having been written
  73. -in any of the character sets listed above is simply said to be ``data''.
  74. +in any of the character sets listed above is simply said to be
  75. +.Dq data .
  76. .Sh OPTIONS
  77. .Bl -tag -width indent
  78. .It Fl b , -brief
  79. @@ -239,7 +241,12 @@
  80. .Dq FILES
  81. section, below).
  82. .It Fl k , -keep-going
  83. -Don't stop at the first match, keep going.
  84. +Don't stop at the first match, keep going. Subsequent matches will be
  85. +prepended by
  86. +.Dq "\[rs]012\- ".
  87. +(If you want a newline, see
  88. +.Dq "\-r"
  89. +option.)
  90. .It Fl L , -dereference
  91. option causes symlinks to be followed, as the like-named option in
  92. .Xr ls 1
  93. @@ -252,7 +259,8 @@
  94. This can be a single file, or a colon-separated list of files.
  95. If a compiled magic file is found alongside, it will be used instead.
  96. With the
  97. -.Fl i or
  98. +.Fl i
  99. +or
  100. .Fl "mime"
  101. option, the program adds
  102. .Dq .mime
  103. @@ -339,6 +347,11 @@
  104. and/or
  105. .Dq .mgc
  106. to the value of this variable as appropriate.
  107. +However,
  108. +.Pa file
  109. +has to exist in order for
  110. +.Pa file.mime
  111. +to be considered.
  112. The environment variable
  113. .Dv POSIXLY_CORRECT
  114. controls (on systems that support symbolic links), if
  115. @@ -413,12 +426,6 @@
  116. The order of entries in the magic file is significant.
  117. Depending on what system you are using, the order that
  118. they are put together may be incorrect.
  119. -If your old
  120. -.Nm
  121. -command uses a magic file,
  122. -keep the old magic file around for comparison purposes
  123. -(rename it to
  124. -.Pa __MAGIC__.orig ).
  125. .Sh EXAMPLES
  126. .Bd -literal -offset indent
  127. $ file file.c file /dev/{wd0a,hda}
  128. @@ -586,9 +593,17 @@
  129. The new support for multiple character codes makes it even slower.
  130. .Pp
  131. This manual page, and particularly this section, is too long.
  132. +.Sh RETURN CODE
  133. +.Nm
  134. +almost always returns 0. It returns a different code if it cannot open a file.
  135. .Sh AVAILABILITY
  136. You can obtain the original author's latest version by anonymous FTP
  137. on
  138. .Dv ftp.astron.com
  139. in the directory
  140. .Dv /pub/file/file-X.YZ.tar.gz
  141. +.Pp
  142. +This Debian version adds a number of new magix entries. It can be
  143. +obtained from every site carrying a Debian distribution (that is
  144. +.Dv ftp.debian.org
  145. +and mirrors).
  146. diff -Naur file-4.20.orig/doc/libmagic.man file-4.20/doc/libmagic.man
  147. --- file-4.20.orig/doc/libmagic.man 2007-01-25 21:04:08.000000000 +0000
  148. +++ file-4.20/doc/libmagic.man 2007-04-03 17:56:16.000000000 +0000
  149. @@ -39,7 +39,7 @@
  150. .Nm magic_load
  151. .Nd Magic number recognition library.
  152. .Sh LIBRARY
  153. -.Lb libmagic
  154. +.Lb libmagic1
  155. .Sh SYNOPSIS
  156. .In magic.h
  157. .Ft magic_t
  158. diff -Naur file-4.20.orig/doc/magic.man file-4.20/doc/magic.man
  159. --- file-4.20.orig/doc/magic.man 2007-01-12 17:38:27.000000000 +0000
  160. +++ file-4.20/doc/magic.man 2007-04-03 17:56:16.000000000 +0000
  161. @@ -65,7 +65,7 @@
  162. .Dq c
  163. flag, specifies case insensitive matching: lowercase
  164. characters in the magic match both lower and upper case characters in the
  165. -targer, whereas upper case characters in the magic, only much uppercase
  166. +target, whereas upper case characters in the magic, only much uppercase
  167. characters in the target.
  168. .It Dv pstring
  169. A pascal style string where the first byte is interpreted as the an