ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Vitaly Lipatov <lav@altlinux.ru>
To: community@altlinux.ru
Subject: Re: [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT]
Date: Thu, 17 Mar 2005 15:40:18 +0300
Message-ID: <200503171540.18520.lav@altlinux.ru> (raw)
In-Reply-To: <4239360F.7080408@ricom.ru>

On Thursday 17 March 2005 10:47, Alexey Morsov wrote:
> И все равно не догнал... ну дублирует оно строку. Мне то не
> надо дублировать строку. Мне надо ее изменить...
Строку из вашего примера char *text="ляля"; изменить НЕВОЗМОЖНО.
> Соответственно изменив ее размер...
Если вы хотите изменить размер строки, так вычислите новый 
размер, сделайте malloc, скопируйте туда строку старую, добавьте 
новое, освободите память от старой строки.

> > а лучше Питон использовать :)
>
> Лучше лучше - я знаю что работа со строками в Си - это гемор -
> но мне нужно именно на Си... :)
> Я Демона написать хочу - а как известно "скриптовый демон это
> лучшая шутка которую я слышал (C) ldv" ;)
Всё от задачи зависит. И в любом случае прототип можно и на 
bash/python/perl писать.

-- 
Lav
Виталий Липатов
Санкт-Петербург
GNU! ALT Linux Team! LaTeX! LyX!


  parent reply	other threads:[~2005-03-17 12:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-15 11:03 [Comm] опять Си - и memmory allocation :) Alexey Morsov
2005-03-15 11:12 ` Alexey Rusakov
2005-03-15 11:35   ` Alexey Morsov
2005-03-15 13:31     ` Alexandr R. Ogurtzoff
2005-03-15 14:02       ` [Comm] НОЪРЭ яХ - Х " Alexey Morsov
2005-03-16 20:32         ` [Comm] НОЪРЭ яХ - Х memmory allocation :) [JT] Vitaly Lipatov
2005-03-17  7:47           ` Alexey Morsov
2005-03-17  7:59             ` Alexey I. Froloff
2005-03-17  9:27             ` Mike Lykov
2005-03-17 10:32               ` Alexey Morsov
2005-03-17 11:01                 ` Maxim Tyurin
2005-03-17 11:09                   ` Alexey Morsov
2005-03-17 12:26                     ` Mike Lykov
2005-03-17 13:29                       ` Alexey Morsov
2005-03-18  5:25                         ` Mike Lykov
2005-03-17 12:40             ` Vitaly Lipatov [this message]
2005-03-15 11:22 ` [Comm] опять Си - и memmory allocation :) Denis S. Filimonov
2005-03-15 13:27 ` Mike Lykov
2005-03-15 13:31   ` [Comm] опять Си - и memmory allocation:) Макс

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=200503171540.18520.lav@altlinux.ru \
    --to=lav@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