diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 07:18:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 07:18:42 +0000 |
commit | e8788a51a630275dc82c9a5bd366949b790dda65 (patch) | |
tree | 53308a524554c9772653d4a8b3254b7da9c9ee87 /editor | |
parent | e81b0432cad0fadd573d62eb47797bb7bb64a9cc (diff) | |
download | netpbm-mirror-e8788a51a630275dc82c9a5bd366949b790dda65.tar.gz netpbm-mirror-e8788a51a630275dc82c9a5bd366949b790dda65.tar.xz netpbm-mirror-e8788a51a630275dc82c9a5bd366949b790dda65.zip |
clean up
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@16 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pnmcrop.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/editor/pnmcrop.c b/editor/pnmcrop.c index 5fafbaac..4ef778c3 100644 --- a/editor/pnmcrop.c +++ b/editor/pnmcrop.c @@ -338,13 +338,19 @@ findBordersInFile(const char * const borderFileName, +static const char * +ending(unsigned int const n) { + + return n > 1 ? "s" : ""; +} + + + static void reportOneEdge(unsigned int const oldBorderSize, unsigned int const newBorderSize, const char * const place) { -#define ending(n) (((n) > 1) ? "s" : "") - if (newBorderSize > oldBorderSize) pm_message("Adding %u pixel%s to the %u-pixel %s border", newBorderSize - oldBorderSize, @@ -376,10 +382,10 @@ reportCroppingParameters(unsigned int const oldLeftBorderSize, oldTopBorderSize == 0 && oldBottomBorderSize == 0) pm_message("No Border found."); - reportOneEdge(oldLeftBorderSize, newLeftBorderSize, "left" ); - reportOneEdge(oldRightBorderSize, newRightBorderSize, "right" ); - reportOneEdge(oldTopBorderSize, newTopBorderSize, "top" ); - reportOneEdge(oldBottomBorderSize, newBottomBorderSize, "bottom" ); + reportOneEdge(oldLeftBorderSize, newLeftBorderSize, "left" ); + reportOneEdge(oldRightBorderSize, newRightBorderSize, "right" ); + reportOneEdge(oldTopBorderSize, newTopBorderSize, "top" ); + reportOneEdge(oldBottomBorderSize, newBottomBorderSize, "bottom"); } |