OS4 DepotLogo by Nickman 
(anonymous IP: 18.221.59.121,2258) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (602)
   o Document (24)
   o Driver (97)
   o Emulation (149)
   o Game (1011)
   o Graphics (500)
   o Library (118)
   o Network (234)
   o Office (66)
   o Utility (932)
   o Video (69)

Total files: 4399

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Development » Utility » txt2char.lha

Txt2char

Description: Transforms textfile to 1-dim char array (char[])
Download: txt2char.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 9kb
Version: 1.20
Date: 20 Feb 2011
Author: angel bitch / candle (CDL) & slut nancy / broke ass hoes (BAH)
Submitter: Marko Seppänen
Homepage: http://www.m4rko.com/candle
Category: development/utility
Replaces: development/utility/txt2char.lha
License: Other
Distribute: yes
Min OS Version: 4.0
FileID: 6251
 
Comments: 1
Snapshots: 0
Videos: 0
Downloads: 193  (Current version)
247  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
txt2char - 1.20
===============

Transforms an Amiga-ASCII compatible textfile (including any tabs and
newlines) to a one-dimensional char array (char[]) ready to be included
and printed in C.

Usage: txt2char <filename> [variable_name]

C source code (with some comments) and a makefile is included in the package.


Example
-------

Let's say you have a textfile named "test.txt".

Then will the following in Shell:

  txt2char test.txt some_var > test.h

Transform it to another file called "test.h". This can then in C be included
and printed straight out like:

#include "test.h"
  //..
printf("%s", some_var);
  //..


Changes
-------
1.20: (Feb 2011)
  - Now compiled with the speed optimization flag on, whereas the test is
    compiled with the size optimization.
  - Increased path/name buffers from 256 to 2048 bytes.
  - Added checks for buffer overflows.
  - Simplified things, the test file is now an own source file.
  - Changed so that the return codes are included rather than hard coded.
  - Added a make file for convenience.
1.11: (Feb 2011)
  - Fixed correct return codes.
  - Added Amiga-version string.
  - Expanded the test text file with an ASCII-image...
  - Included a ready-made test_txt2char executable for your convenience.
1.10: (Feb 2011)
  - Added a TEST_MODE with test code to check for correctness.
  - Fixed issue, "warning: unknown escape sequence '\^'".
  - Fixed issue, "instructions in usage text not quite right". 
  - Fixed bug, "% got tranformed to %%".
  - Fixed bug, "each line gets an extra trailing space".
  - Fixed bug, "one extra space gets added to the top of string".
  - Added instructions and fixed a lot of typos, etc. in readme file.
1.00: (2011)
  - Changed tranformation so it produces a one-dimensional char array instead.
  - Added a VARIABLE_NAME option so it's possible to name the variable.
  - Changed code formatting to another one.
  - Added a few more checks, etc.
  - New version named to txt2char.
0.50: (Sep 2008)
  - txt2c version 0.5.

Credz
-----
txt2char by angel bitch / candle (CDL)
derives from txt2c 0.5 (sep 2008) by slut nancy / broke ass hoes (BAH).



Copyright © 2004-2024 by Björn Hagström All Rights Reserved