1
# @(#) $Revision: 4.4 $ $Source: /judy/src/apps/demo/run_demo $
3
# Simple Judy example script. See the first block of text below, or just run
4
# this with no arguments.
8
COMPILE="cc -I../.. -o $BASE $PROGRAM `find ../../ -name libJudy.a`"
10
set -e # exit if anything goes wrong.
16
This script illustrates a simple program that calls the Judy library,
17
shows how to compile it, and then runs it for you.
19
The program reads numbers from standard input and stores them in a
20
JudyL array as array indexes. The target value associated with each
21
number (index) is the number of times it was duplicated in the input.
24
Press RETURN to continue and view the program source code...
30
# SHOW THE SAMPLE C PROGRAM:
32
echo '____________________________________'
38
echo 'Press RETURN to continue...'
42
# COMPILE THE SAMPLE C PROGRAM:
46
To compile this program with the Judy library already installed on your
47
system, the simplest command line is:
51
Press RETURN to continue and compile the program source code...
58
# RUN THE SAMPLE C PROGRAM:
61
echo "Press RETURN to run the sample program \"$BASE\"..."