ICU-0105 regex sample cleanup & unix makefile

X-SVN-Rev: 10598
This commit is contained in:
Andy Heninger 2002-12-11 01:33:05 +00:00
parent d669d4e484
commit b094732484
3 changed files with 24 additions and 5 deletions

View file

@ -1,4 +1,22 @@
# Copyright (c) 2002 IBM, Inc. and others
# Copyright (c) 2000-2002 IBM, Inc. and others
# sample code makefile
# TODO
# Usage:
# - configure, build, install ICU (make install)
# - make sure "icu-config" (in the ICU installed bin directory) is on
# the path
# - do 'make' in this directory
#### definitions
# Name of your target
TARGET=ugrep
# All object files (C or C++)
OBJECTS=ugrep.o
#### rules
# Load in standard makefile definitions
include ../defs.mk
# the actual rules (this is a simple sample)
include ../rules.mk

View file

@ -52,8 +52,9 @@ To Build on Unixes
gmake install
3. Build the sample
Put the install directory containing icu-config on the $PATH.
This will generally be <icu install directory>/bin
cd <icu directory>/source/samples/ugrep
export ICU_PREFIX= <icu install directory>
gmake
To Run on Unixes

View file

@ -186,7 +186,7 @@ void processOptions(int argc, const char **argv) {
else if(strcmp(arg, "--help") == 0) {
doUsage = TRUE;
}
if(strcmp(arg, "-n") == 0 || strcmp(arg, "--line-number") == 0) {
else if(strcmp(arg, "-n") == 0 || strcmp(arg, "--line-number") == 0) {
displayLineNum = TRUE;
}
/* POSIX.1 says all arguments after -- are not options */
@ -212,7 +212,7 @@ void processOptions(int argc, const char **argv) {
}
if (doVersion) {
printf("ugrep version 0.01");
printf("ugrep version 0.01\n");
if (optInd == argc) {
exit(0);
}