nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS
NMERandomGen.c File Reference

Generate random input for testing Nyctergatis Markup Engine. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Defines

#define rnd()   (seed = 1664525 * seed + 1013904223, (seed >> 24) & 0xff)
 Random generator (platform-independant, with uint32 seed or larger)

Functions

int main (int argc, char **argv)
 Application entry point.

Detailed Description

Generate random input for testing Nyctergatis Markup Engine.

Author:
Yves Piguet.

nmerandom Usage

This program filters standard input and writes the result to sandard output. It can be called as follows to convert file readme.nme to HTML file readme.html:

    ./nmerandom options

Here is the list of options it supports:

  • --ascii ASCII output (default: random bytes)
  • --cr CR (0x0D) for end-of-line (default: random)
  • --crlf CRLF (0x0D 0x0A) for end-of-line (default: random)
  • --help help message
  • --lf LF (0x0A) for end-of-line (default: random)
  • --maxlinelength max number of characters per line, or 0 for no limit
  • --seed seed of the pseudorandom generator (default: 1)
  • --size approximate size of output in bytes

To test nme in bash (Bourne Again Shell):

  do
  ./nmerandom --lf --ascii --size 10000 --seed $s | (./nme --test || echo $s)
  ./nmerandom --lf --ascii --size 10000 --seed $s | (./nme --checkhooks || echo $s)
  done

Definition in file NMERandomGen.c.

Generated by Doxygen.
Copyright 2007-2013, Yves Piguet.
All rights reserved.