998-doc-manpages.dpatch 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 -Naurp file-4.23.orig/doc/file.man file-4.23/doc/file.man
  7. --- file-4.23.orig/doc/file.man 2007-10-23 19:58:59.000000000 +0000
  8. +++ file-4.23/doc/file.man 2008-01-12 18:06:28.000000000 +0000
  9. @@ -49,9 +49,8 @@ meaning anything else (data is usually
  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. @@ -78,17 +77,17 @@ Any known file types appropriate to the
  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. @@ -101,12 +100,14 @@ The concept of a
  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. @@ -146,7 +147,7 @@ has determined the character set used in
  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. @@ -163,7 +164,8 @@ The language test routines also test for
  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. @@ -244,7 +246,12 @@ Like
  80. .Fl i ,
  81. but print only the specified element(s).
  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. @@ -345,6 +352,11 @@ adds
  94. and/or
  95. .Dq .mgc
  96. to the value of this variable as appropriate.
  97. +However,
  98. +.Pa file
  99. +has to exist in order for
  100. +.Pa file.mime
  101. +to be considered.
  102. The environment variable
  103. .Dv POSIXLY_CORRECT
  104. controls (on systems that support symbolic links), if
  105. @@ -419,12 +431,6 @@ will be distributed periodically.
  106. The order of entries in the magic file is significant.
  107. Depending on what system you are using, the order that
  108. they are put together may be incorrect.
  109. -If your old
  110. -.Nm
  111. -command uses a magic file,
  112. -keep the old magic file around for comparison purposes
  113. -(rename it to
  114. -.Pa __MAGIC__.orig ).
  115. .Sh EXAMPLES
  116. .Bd -literal -offset indent
  117. $ file file.c file /dev/{wd0a,hda}
  118. @@ -591,9 +597,17 @@ This program is slower than some vendors
  119. The new support for multiple character codes makes it even slower.
  120. .Pp
  121. This manual page, and particularly this section, is too long.
  122. +.Sh RETURN CODE
  123. +.Nm
  124. +almost always returns 0. It returns a different code if it cannot open a file.
  125. .Sh AVAILABILITY
  126. You can obtain the original author's latest version by anonymous FTP
  127. on
  128. .Dv ftp.astron.com
  129. in the directory
  130. .Dv /pub/file/file-X.YZ.tar.gz
  131. +.Pp
  132. +This Debian version adds a number of new magix entries. It can be
  133. +obtained from every site carrying a Debian distribution (that is
  134. +.Dv ftp.debian.org
  135. +and mirrors).
  136. diff -Naurp file-4.23.orig/doc/libmagic.man file-4.23/doc/libmagic.man
  137. --- file-4.23.orig/doc/libmagic.man 2007-10-09 20:14:57.000000000 +0000
  138. +++ file-4.23/doc/libmagic.man 2008-01-12 18:04:15.000000000 +0000
  139. @@ -39,7 +39,7 @@
  140. .Nm magic_load
  141. .Nd Magic number recognition library.
  142. .Sh LIBRARY
  143. -.Lb libmagic
  144. +.Lb libmagic1
  145. .Sh SYNOPSIS
  146. .In magic.h
  147. .Ft magic_t
  148. diff -Naurp file-4.23.orig/doc/magic.man file-4.23/doc/magic.man
  149. --- file-4.23.orig/doc/magic.man 2007-11-08 00:31:37.000000000 +0000
  150. +++ file-4.23/doc/magic.man 2008-01-12 18:04:15.000000000 +0000
  151. @@ -69,7 +69,7 @@ Finally the
  152. .Dq c
  153. flag, specifies case insensitive matching: lowercase
  154. characters in the magic match both lower and upper case characters in the
  155. -targer, whereas upper case characters in the magic, only much uppercase
  156. +target, whereas upper case characters in the magic, only much uppercase
  157. characters in the target.
  158. .It Dv pstring
  159. A pascal style string where the first byte is interpreted as the an