Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Over the shoulder supervision is more a need of the manager than the programming task.


devel / comp.lang.c / Re: saving fileXXX.bmp

SubjectAuthor
* saving fileXXX.bmpfir
+* Re: saving fileXXX.bmpMalcolm McLean
|`- Re: saving fileXXX.bmpMikko
+* Re: saving fileXXX.bmpfir
|+* Re: saving fileXXX.bmpjak
||`* Re: saving fileXXX.bmpfir
|| `* Re: saving fileXXX.bmpjak
||  +- Re: saving fileXXX.bmpScott Lurndal
||  `* Re: saving fileXXX.bmpfir
||   `* Re: saving fileXXX.bmpfir
||    `* Re: saving fileXXX.bmpjak
||     `* Re: saving fileXXX.bmpfir
||      `* Re: saving fileXXX.bmpjak
||       `* Re: saving fileXXX.bmpfir
||        `- Re: saving fileXXX.bmpjak
|`* Re: saving fileXXX.bmpMalcolm McLean
| `* Re: saving fileXXX.bmpfir
|  `- Re: saving fileXXX.bmpfir
`* Re: saving fileXXX.bmpMike Terry
 `* Re: saving fileXXX.bmpfir
  `* Re: saving fileXXX.bmpMike Terry
   `* Re: saving fileXXX.bmpfir
    `* Re: saving fileXXX.bmpMike Terry
     +* Re: saving fileXXX.bmpfir
     |`* Re: saving fileXXX.bmpfir
     | `- Re: saving fileXXX.bmpfir
     `- Re: saving fileXXX.bmpfir

Pages:12
Re: saving fileXXX.bmp

<uu2ad1$393dp$1@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=34803&group=comp.lang.c#34803

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!.POSTED!not-for-mail
From: fir...@grunge.pl (fir)
Newsgroups: comp.lang.c
Subject: Re: saving fileXXX.bmp
Date: Thu, 28 Mar 2024 00:33:53 +0100
Organization: i2pn2 (i2pn.org)
Message-ID: <uu2ad1$393dp$1@i2pn2.org>
References: <utpl9q$2u0jk$1@i2pn2.org> <jKidnZQtQtYXfJ37nZ2dnZfqnPadnZ2d@brightview.co.uk> <utrbbd$30267$1@i2pn2.org> <zYicnXxWRq4OM5z7nZ2dnZfqn_ednZ2d@brightview.co.uk> <utsgmp$31pg0$1@i2pn2.org> <VdecnfVN_aK1bpz7nZ2dnZfqnPidnZ2d@brightview.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Mar 2024 23:33:53 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="3444153"; mail-complaints-to="usenet@i2pn2.org";
posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0";
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <VdecnfVN_aK1bpz7nZ2dnZfqnPidnZ2d@brightview.co.uk>
 by: fir - Wed, 27 Mar 2024 23:33 UTC

Mike Terry wrote:
> On 25/03/2024 18:44, fir wrote:
>> Mike Terry wrote:
>>> On 25/03/2024 08:07, fir wrote:
>>>> Mike Terry wrote:
>>>>> On 24/03/2024 16:44, fir wrote:
>>>>>> i want to save bitmap (when using editor) but i dont wannt
>>>>>> to pen a dialog for saving ui just wana do quicksave but not replace
>>>>>> the file already exist so i want to maybe use such scheme i will sawe
>>>>>>
>>>>>> "painting001.bmp" and if there is such number i will just increase
>>>>>> the number to 002 if such exist i will use 003 and so on
>>>>>>
>>>>>> do yu thing it is standable to use c std lib (and probably just
>>>>>> fopen fclose to detect if that file already exist of there is a need
>>>>>> to use some specific windows functions?
>>>>>>
>>>>>> i never used it though - though maybe i could becouse code
>>>>>> that is able to walk on directories and read all files may be handy
>>>>>> for various practical usage (liek finding something , removing
>>>>>> duplicates etc)
>>>>>
>>>>> I think the bigger issue is where to create such files? If users have
>>>>> used your app to open some existing .bmp file for processing, it's
>>>>> quite
>>>>> possible they won't have write access to that folder. In that case a
>>>>> Save or Save As operation should trigger a standard file system file
>>>>> select dialog in a GUI program which is fair enough, but it sounds
>>>>> like
>>>>> you want to create a temp file with no user intervention? Command
>>>>> line
>>>>> utilities often have some kind of "temp folder" option.
>>>>>
>>>>> Ideas to consider:
>>>>> - tmpfile() (POSIX?]
>>>>> - GetTempFileName(), GetTempPath() [Windows]
>>>>> - Use environment variables like TMP/TEMP? (Possibly different usage
>>>>> on different platforms)
>>>>> - how to clean up such temp files so they don't pollute the file
>>>>> system
>>>>> long term?
>>>>> - ensuring uniqueness? [e.g. if multiple copies of your program are
>>>>> running at the same time]
>>>>> (Your idea is ok on this front, provided:
>>>>> * only one process can create the temp file and
>>>>> * a second open attempt with the same name will fail, and
>>>>> * your logic has a loop to recognise such failures and try again
>>>>> with a
>>>>> new name etc..
>>>>> Note GetTempFileName() fails on this front...)
>>>>> - Other filename ideas : including timestamps or GUIDs or PIDs in the
>>>>> filename, but by
>>>>> themselves those may not fully solve uniqueness problem.
>>>>> - Listing the directory to generate available filenames might be more
>>>>> efficient in some usage cases, especially if the API includes file
>>>>> filter options.
>>>>>
>>>>
>>>> the issue is that standard windows ways to do it - like chose tool
>>>> form menu then use it, save file bny opening save dialogs - are
>>>> terribly slow if someone want to do things wuick and fast - thats why
>>>> i like the
>>>> programs like irfanview or total commander for example
>>>
>>> What you're describing is the standard windows way /for the user to
>>> identify a file/ e.g. an application document that the user has created
>>> and wants to save /somewhere they specify/.
>>>
>>> It's not the the standard windows way to create a temporary file for
>>> application use. For that purpose I imagine the "standard" process
>>> would be to call GetTempPath() then possibly create a subfolder for your
>>> application, and save the file there. "Standard" apps like Visual
>>> Studio, Office etc. all create temp files without prompting the user
>>> with a dialog box.
>>>
>>> Mike.
>>>
>>
>> i dont want temp file so i dont fully know what you are talkin about
>>
>> i just want a quicksave say you draw image and after say 30 seconds of
>> editions you pred F5 for quicksave and you got a history of editions
>> in a form of many bitmaps in working directory - then you can delect
>> them and delete those not needed with total commander
>>
>
> Sure... if you know where you want to save the quicksaves and you're
> confident the user will have access to that location, no problem. [My
> earlier idea of putting the date/time in the filename might still be
> useful, e.g. when you come to delete the files later on with TC.]
>
> Mike.

i somewhat updatet the idea

now i would like editor for lowres animation that
worx like this

you start from base frame - by pressing arrow right you clone
the image and my edit it to generate second frame of animation,
then by pressing right you clone it to gnerate third and so on

by pressing l;eft you get back to previous if it exist (if no you
clone - you also should clone by pressing up and down to be
ablo to clone more animation branches from given point

so i think i probably will save as:

(assume "A.bmp" is starting frame)

"A.bmp"
"Ar.bmp"
"Arr.bmp"
"Arrr.bmp"
"Arru.bmp"
"Arruu.bmp"
"Arruul.bmp"
"Arruull.bmp"

and so on

Re: saving fileXXX.bmp

<uu3vap$3ko48$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=34816&group=comp.lang.c#34816

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@please.ty (jak)
Newsgroups: comp.lang.c
Subject: Re: saving fileXXX.bmp
Date: Thu, 28 Mar 2024 15:37:13 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uu3vap$3ko48$1@dont-email.me>
References: <utpl9q$2u0jk$1@i2pn2.org> <utq5qj$2ummn$1@i2pn2.org>
<utq6qd$jtaq$1@dont-email.me> <utrbig$30267$3@i2pn2.org>
<utsfnb$18bvo$1@dont-email.me> <utu3qg$33j67$1@i2pn2.org>
<utu9v8$33qfv$2@i2pn2.org> <utv1e1$28rsc$1@dont-email.me>
<uu0qnk$3714j$1@i2pn2.org> <uu0rji$2pd5k$1@dont-email.me>
<uu11nm$37aof$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 28 Mar 2024 14:37:14 +0100 (CET)
Injection-Info: dont-email.me; posting-host="1b2120a6f92f7424a8597d86c7e9bdba";
logging-data="3825800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+b4ks7qo/1Gqv41VQzrI1E"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.18.2
Cancel-Lock: sha1:e81haiVv5n6rQooyxI9j+hMDI4U=
In-Reply-To: <uu11nm$37aof$1@i2pn2.org>
 by: jak - Thu, 28 Mar 2024 14:37 UTC

fir ha scritto:
> jak wrote:
>> fir ha scritto:
>>>
>>> i do not love to much those clib functions on working on strings and
>>> memcopy etc and i rather write my own (except printf, sprintf)
>>
>> I don't like those functions too. I only use them for attempts and
>> examples to reduce code lines.
>>
>>
> still you could write names in pascal i guess thet describe what they do
> becouse honsetly seing them i dont know immediatelly what they do as
> i dont know them all (as i not use them or rarely)

....and maybe I should do that using your language and not mine. :^D

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor