From: Mikhail Zabaluev <mhz@alt-linux.org>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] C/C++ question
Date: Fri May 4 09:50:01 2001
Message-ID: <20010504012038.A6193@localhost.localdomain> (raw)
In-Reply-To: <20010430205935.56328632@ser-linux.ffyud>; from suralis@pisem.net on Tue, May 01, 2001 at 12:59:34AM +0400
Hello Serge,
On Tue, May 01, 2001 at 12:59:34AM +0400, Serge Skorokhodov wrote:
>
> On Mon, 30 Apr 2001 21:16:55 +0400
> Michael Ivanov <ivans@isle.spb.ru> wrote:
>
> > On 30 April 2001 14:11, you wrote:
> > >
> > В одной программе на "двухкрестовом" столкнулся со строчкой,
> > > наподобие следующего отрывка:
> > >
> > > char buf[BUFSIZ];
> > > // ...
> > > if ( buf[0] == '\n' || buf[0] == '<cr>' )
> > > ^^^^^^^^^^^^^^^^
> >
> > А это не _один_ символ с кодом '\r'? По крайней мере nedit его
> > отображает именно так.
>
> Да, а я тут, старый дурень, дискуссии о симантике С-подобных
> языков веду:)
>
> Но, если честно, то мне еще непонятнее: В nedit это отображается
> '<cr>', в xemacs -- '^M', а мс его вообще не отображает, и при
> просмотре, и при редактировании просто ''. Как выяснить, какой же
> символ в программе. Я всегда думал, что исходный текст есть
> исходный текст, ascii есть ascii. А тут и я, и компилятор в
> затруднении, и неизвестно, какая тулза из богатого инструментария
> *nix может помочь:(
xxd или hexdump :)
\0x0d вообще чужд Unix. Но редакторы, особенно матерые, vi или emacs,
такие символы стараются отображать и редактировать. По крайней мере их
можно удалять :) А насчет исходного текста - я не уверен, что этот
символ вообще разрешено употреблять как он есть в стандарте C.
Пользуйтесь '\r', '\0xd' или '\015'.
--
Stay tuned,
MhZ JID: mookid@jabber.org
___________
F: When into a room I plunge, I
Sometimes find some VIOLET FUNGI.
Then I linger, darkly brooding
On the poison they're exuding.
-- The Roguelet's ABC
prev parent reply other threads:[~2001-05-04 9:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-30 14:09 Serge Skorokhodov
2001-04-30 14:28 ` Egor Azanov
2001-04-30 18:27 ` Serge Skorokhodov
2001-04-30 17:51 ` Andrei Gerasimenko
2001-04-30 20:28 ` Serge Skorokhodov
2001-04-30 21:28 ` Michael Ivanov
2001-05-03 12:30 ` Serge Skorokhodov
2001-05-03 14:02 ` Sergey Vlasov
2001-05-03 15:54 ` Re[2]: " Serge Skorokhodov
2001-05-03 19:12 ` Sergey Vlasov
2001-05-04 19:18 ` Serge Skorokhodov
2001-05-04 19:22 ` Sergey Vlasov
2001-05-04 20:30 ` Serge Skorokhodov
2001-05-04 20:38 ` Sergey Vlasov
2001-05-04 23:37 ` Serge Skorokhodov
2001-05-03 20:24 ` Michael Ivanov
2001-05-03 21:22 ` Sergei
2001-05-04 9:50 ` Mikhail Zabaluev [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=20010504012038.A6193@localhost.localdomain \
--to=mhz@alt-linux.org \
--cc=mandrake-russian@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