OS4Depot.net 20130227_1013
  Home Search Mirrors Contact Info Credits

 Readme data for Root » Development » Utility » txt2char.lha

Description: Transforms textfile to 1-dim char array (char[])
Install: txt2char.lha
Size: 9kb 5
Version: 1.20
Date: 20 Feb 11
Author: angel bitch / candle (CDL) & slut nancy / broke ass hoes (BAH)
Submitter: Marko Seppänen
Homepage: http://www.m4rko.com/candle
Category: development/utility
License: Other
Distribute: yes
Min OS Version: 4.0
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 (c) 2004-2013 Björn Hagström. All rights reserved.
OS4 and its logos are registered trademarks of Hyperion Entertainment