Skip to content

Commit c84961c

Browse files
author
Cristy
committed
cosmetic
1 parent e2ccacd commit c84961c

File tree

3 files changed

+61
-18
lines changed

3 files changed

+61
-18
lines changed

magick.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
#
3+
# Copyright © 1999 ImageMagick Studio LLC, a non-profit organization
4+
# dedicated to making software imaging solutions freely available.
5+
#
6+
# You may not use this file except in compliance with the License. You may
7+
# obtain a copy of the License at
8+
#
9+
# https://imagemagick.org/script/license.php
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Convenience script to verify the ImageMagick build before you install. For
18+
# example:
19+
#
20+
# magick.sh convert -size 640x480 gradient:black-yellow gradient.png
21+
22+
top_srcdir='/home/cristy/a'
23+
top_builddir='/home/cristy/a'
24+
25+
MAGICK_CODER_MODULE_PATH='/home/cristy/a/coders'
26+
MAGICK_CONFIGURE_SRC_PATH='/home/cristy/a/config'
27+
MAGICK_CONFIGURE_BUILD_PATH='/home/cristy/a/config'
28+
MAGICK_FILTER_MODULE_PATH='/home/cristy/a/filters'
29+
DIRSEP=':'
30+
31+
PATH="${top_builddir}/utilities:${PATH}"
32+
33+
if test -n "$VERBOSE"; then
34+
printf "$@"
35+
fi
36+
env \
37+
LD_LIBRARY_PATH="${top_builddir}/magick/.libs:${top_builddir}/wand/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
38+
MAGICK_CODER_MODULE_PATH="${MAGICK_CODER_MODULE_PATH}" \
39+
MAGICK_CONFIGURE_PATH="${MAGICK_CONFIGURE_BUILD_PATH}${DIRSEP}${MAGICK_CONFIGURE_SRC_PATH}" \
40+
MAGICK_FILTER_MODULE_PATH="${MAGICK_FILTER_MODULE_PATH}" \
41+
PATH="${PATH}" \
42+
"$@"

wand/display.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
13621362
resource_info.map_type=(char *) NULL;
13631363
if (*option == '+')
13641364
break;
1365-
(void) CopyMagickString(argv[i]+1,"...",strlen(argv[i]+1)+1);
1365+
(void) CopyMagickString(argv[i]+1,"sans",strlen(argv[i]+1)+1);
13661366
i++;
13671367
if (i == (ssize_t) argc)
13681368
ThrowDisplayException(OptionError,"MissingArgument",option);

winpath.sh

+18-17
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@
1717
# Written by Bob Friesenhahn, June 2002
1818
#
1919
arg="$1"
20-
escapes=0
21-
if test -n "$2"
22-
then
20+
escapes=4
21+
if test -n "$2"; then
2322
escapes="$2"
24-
fi
25-
if test $escapes -gt 3
26-
then
27-
echo "$0: escape level must in range 0 - 3"
28-
exit 1
23+
if test $escapes -gt 3; then
24+
printf "$0: escape level must in range 0 - 3\n"
25+
exit 1
26+
fi
2927
fi
3028
result=''
3129
length=0
@@ -34,9 +32,9 @@ mount | sed -e 's:\\:/:g' | (
3432
IFS="\n"
3533
while read mount_entry
3634
do
37-
win_mount_path=`echo "$mount_entry" | sed -e 's: .*::g'`
38-
unix_mount_path=`echo "$mount_entry" | sed -e 's:.* on ::;s: type .*::'`
39-
temp=`echo "$arg" | sed -e "s!^$unix_mount_path!$win_mount_path/!"`
35+
win_mount_path=`printf "$mount_entry\n" | sed -e 's: .*::g'`
36+
unix_mount_path=`printf "$mount_entry\n" | sed -e 's:.* on ::;s: type .*::'`
37+
temp=`printf "$arg" | sed -e "s!^$unix_mount_path!$win_mount_path!"`
4038
if test "$temp" != "$arg"
4139
then
4240
candidate="$temp"
@@ -50,21 +48,24 @@ mount | sed -e 's:\\:/:g' | (
5048
done
5149
if test -z "$result"
5250
then
53-
echo "$0: path \"$arg\" is not mounted"
51+
printf "$0: path \"$arg\" is not mounted\n"
5452
exit 1
5553
fi
56-
case $escapes in
54+
case "$escapes" in
5755
0)
58-
echo "$result" | sed -e 's:/:\\:g'
56+
printf "${result}" | sed -e 's:/:\\:g'
5957
;;
6058
1)
61-
echo "$result" | sed -e 's:/:\\\\:g'
59+
printf "${result}" | sed -e 's:/:\\\\:g'
6260
;;
6361
2)
64-
echo "$result" | sed -e 's:/:\\\\\\\\:g'
62+
printf "${result}" | sed -e 's:/:\\\\\\\\:g'
6563
;;
6664
3)
67-
echo "$result" | sed -e 's:/:\\\\\\\\\\\\\\\\:g'
65+
printf "${result}" | sed -e 's:/:\\\\\\\\\\\\\\\\:g'
66+
;;
67+
*)
68+
printf "${result}"
6869
;;
6970
esac
7071
exit 0;

0 commit comments

Comments
 (0)