ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexey Voinov <voins@altlinux.ru>
To: community@altlinux.ru
Subject: Re: [Comm] [off] Cygwin crlfs
Date: Thu, 24 Jul 2003 08:25:58 +0400
Message-ID: <20030724042558.GA13196@altlinux.ru> (raw)
In-Reply-To: <133373006.20030723140111@otstavnov.com>

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

Maksim Otstavnov wrote
> AV> В cygwin есть два режима "монтирования" "устройств": text и binary.
> AV> Этот режим определяет в каком режим по умолчанию будут открываться все
> AV> файлы на этом "устройстве". В режиме text производится трансляция
> AV> переводов строк '\n' в crlf (все это знают :) )
> А что интерпретируется как "перевод строки"?
FILE *f = fopen("f1", "w");
fprintf(f, "test\n");	/* получаем "test\xd\xa" */
fclose(f);

f = fopen("f2", "wb");
fprintf(f, "test\n");   /* получаем "test\xa" */
fclose(f);

параметр -b у mount оба случая приводит к второму.


-- 
Best Regards!           | Когда вам платят за работу, надо по крайней мере
Alexey Voinov           | делать вид, что вы работаете...
                        |                         Б.Виан "Осень в Пекине"
voins@voins.program.ru
voins@altlinux.ru


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2003-07-24  4:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20 18:04 Maksim Otstavnov
2003-07-20 20:05 ` Dmitry Azhichakov
2003-07-20 20:22   ` Dmitry Azhichakov
2003-07-21  3:55     ` Re[2]: " Maksim Otstavnov
2003-07-22  8:14       ` Dmitry Azhichakov
2003-07-22 16:23         ` Re[4]: " Maksim Otstavnov
2003-07-21  1:16 ` Alexander Kirey
2003-07-21  1:23   ` Alexander Kirey
2003-07-21  8:56   ` Re[2]: " Maksim Otstavnov
2003-07-23  5:32 ` Alexey Voinov
2003-07-23 10:01   ` Re[2]: " Maksim Otstavnov
2003-07-24  4:25     ` Alexey Voinov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030724042558.GA13196@altlinux.ru \
    --to=voins@altlinux.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git