diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-09-21 18:00:16 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-09-21 18:00:16 +0000 |
commit | 3a2be6f9d910b862d4e5ea237d734315627dd661 (patch) | |
tree | 0525085036572441949db4493a31afa5c8813a91 /editor/pnmcrop.c | |
parent | 3aa04aa72c6ec522395919d528dfce6a92b0de98 (diff) | |
download | netpbm-mirror-3a2be6f9d910b862d4e5ea237d734315627dd661.tar.gz netpbm-mirror-3a2be6f9d910b862d4e5ea237d734315627dd661.tar.xz netpbm-mirror-3a2be6f9d910b862d4e5ea237d734315627dd661.zip |
Release 10.36.0
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@65 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmcrop.c')
-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"); } |