On Tue, May 18, 2004 at 10:22:24AM +0700, php-coder wrote:
>   1) Как написано в man, diff с опцией -b игнорирует изменения в
>      количестве пустых мест. Думал под "пустыми местами"
>      подразумеваются пробелы и табуляция, но оказалось, что для этого
>      нужно использовать другую опцию (-w). Не могли бы вы мне
>      объяснить для чего же нужна опция -b? Что она делает?!

А документацию прочитать (info diff)?

   The `-E' and `--ignore-tab-expansion' options ignore the distinction
between tabs and spaces on input.  A tab is considered to be equivalent
to the number of spaces to the next tab stop.  `diff' assumes that tab
stops are set every 8 print columns.

   The `-b' and `--ignore-space-change' options are stronger.  They
ignore white space at line end, and consider all other sequences of one
or more white space characters to be equivalent.  With these options,
`diff' considers the following two lines to be equivalent, where `$'
denotes the line end:

     Here lyeth  muche rychnesse  in lytell space.   -- John Heywood$   
     Here lyeth muche rychnesse in lytell space. -- John Heywood   $    

   The `-w' and `--ignore-all-space' options are stronger still.  They
ignore difference even if one line has white space where the other line
has none.  "White space" characters include tab, newline, vertical tab,
form feed, carriage return, and space; some locales may define
additional characters to be white space.  With these options, `diff'
considers the following two lines to be equivalent, where `$' denotes
the line end and `^M' denotes a carriage return:

     Here lyeth  muche  rychnesse in lytell space.--  John Heywood$
       He relyeth much erychnes  seinly tells pace.  --John Heywood   ^M$


>   2) Описано, что ф-ция strlen находится в string.h, но у меня все
>      успешно компиллируется и работает и без подключения этого
>      заголовочного файла. В чем причина? Как-то странно это все :-)

Это значит, что string.h подключен из какого-то заголовочного модуля.

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517

Ответить