From 3fde7981ed03f822f2355d9fc7b817bf908ae523 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 26 Feb 2020 11:13:11 +0800 Subject: [PATCH] fix typos: Checks -> Check, Determines -> Determine --- cleanup-code.sh | 9 ++++++--- include/ctrl/combobox.h | 8 ++++---- include/ctrl/listbox.h | 2 +- include/gdi.h | 30 +++++++++++++++--------------- src/gui/lf_test/configure.in | 8 ++++---- src/ial/linux-tty.c | 2 +- src/ial/native/vtswitch-lite.c | 2 +- src/newgdi/flood.c | 2 +- src/newgdi/layout-ellipsize.c | 4 ++-- 9 files changed, 35 insertions(+), 32 deletions(-) diff --git a/cleanup-code.sh b/cleanup-code.sh index 758af7c9..b3c425de 100755 --- a/cleanup-code.sh +++ b/cleanup-code.sh @@ -149,8 +149,11 @@ tab2space() { # sed -i 's/\<__mg_os_start_time_ms\>/__mg_os_start_time/g' `grep '\<__mg_os_start_time_ms\>' -rl include/ src/` -sed -i 's/\/Get/g' `grep '\' -rl include/ src/` -sed -i 's/\/Set/g' `grep '\' -rl include/ src/` -sed -i 's/\/Retrieve/g' `grep '\' -rl include/ src/` +# sed -i 's/\/Get/g' `grep '\' -rl include/ src/` +# sed -i 's/\/Set/g' `grep '\' -rl include/ src/` +# sed -i 's/\/Retrieve/g' `grep '\' -rl include/ src/` + +#sed -i 's/\/Determine/g' `grep '\' -rl include/ src/` +sed -i 's/\/Check/g' `grep '\' -rl include/ src/` exit 0 diff --git a/include/ctrl/combobox.h b/include/ctrl/combobox.h index 84be1e54..3adbd4ee 100644 --- a/include/ctrl/combobox.h +++ b/include/ctrl/combobox.h @@ -637,7 +637,7 @@ extern "C" { /** * \def CB_GETDROPPEDSTATE - * \brief Determines whether the list box of a combo box is dropped down. + * \brief Determine whether the list box of a combo box is dropped down. * * \code * CB_GETIDROPSTATE @@ -705,7 +705,7 @@ extern "C" { /** * \def CB_SETSPINRANGE - * \brief Determines the range of the spin box in a combo box. + * \brief Determine the range of the spin box in a combo box. * * \code * CB_SETSPINRANGE @@ -745,7 +745,7 @@ extern "C" { /** * \def CB_SETSPINVALUE - * \brief Determines the value of the spin box in a combo box. + * \brief Determine the value of the spin box in a combo box. * * \code * CB_SETSPINVALUE @@ -778,7 +778,7 @@ extern "C" { /** * \def CB_SETSPINPACE - * \brief Determines the pace and the fast pace of the spin box in a combo box. + * \brief Determine the pace and the fast pace of the spin box in a combo box. * * \code * CB_SETSPINPACE diff --git a/include/ctrl/listbox.h b/include/ctrl/listbox.h index e0d2494b..8a943a87 100644 --- a/include/ctrl/listbox.h +++ b/include/ctrl/listbox.h @@ -785,7 +785,7 @@ typedef LISTBOXITEMINFO* PLISTBOXITEMINFO; /** * \def LB_GETCARETINDEX - * \brief Determines the index of the item that has the focus rectangle. + * \brief Determine the index of the item that has the focus rectangle. * * An application sends an LB_GETCARETINDEX message to a list box to determine * the index of the item that has the focus rectangle in a multiple-selection diff --git a/include/gdi.h b/include/gdi.h index 309ba5ae..71d94d9c 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -1015,7 +1015,7 @@ MG_EXPORT BOOL GUIAPI SetClipRgn (PCLIPRGN pRgn, const RECT* pRect); /** * \fn BOOL GUIAPI IsEmptyClipRgn (const CLIPRGN* pRgn) - * \brief Determines whether a region is an empty region. + * \brief Determine whether a region is an empty region. * * This function determines whether the region pointed to by \a pRgn is * an empty region. @@ -1077,7 +1077,7 @@ MG_EXPORT BOOL GUIAPI SubtractClipRect (PCLIPRGN pRgn, const RECT* pRect); /** * \fn BOOL GUIAPI PtInRegion (PCLIPRGN region, int x, int y) - * \brief Determines whether a point is in a region. + * \brief Determine whether a point is in a region. * * This function determines whether a point \a (x,y) is in the region pointed * to by \a region. @@ -1094,7 +1094,7 @@ MG_EXPORT BOOL GUIAPI PtInRegion (const PCLIPRGN region, int x, int y); /** * \fn BOOL GUIAPI RectInRegion (PCLIPRGN region, const RECT* rect) - * \brief Determines whether a rectangle is intersected with a region. + * \brief Determine whether a rectangle is intersected with a region. * * This function determines whether the rect \a rect is intersected with * the region pointed to by \a region. @@ -3519,7 +3519,7 @@ MG_EXPORT BOOL GUIAPI MonotoneVerticalPolygonGenerator (void* context, /** * \fn BOOL GUIAPI PolygonIsMonotoneVertical (const POINT* pts, int vertices) - * \brief Checks a polygon is monotone vertical or not. + * \brief Check a polygon is monotone vertical or not. * * This function checks if the given polygon is monotone vertical. * @@ -4696,7 +4696,7 @@ MG_EXPORT void GUIAPI IncludeClipRect (HDC hdc, const RECT* prc); /** * \fn BOOL GUIAPI PtVisible (HDC hdc, int x, int y) - * \brief Checks whether a point is visible. + * \brief Check whether a point is visible. * * This function checks whether the point specified by \a (x,y) is visible, i.e. * it is within the current visible clipping region of the device context @@ -4855,7 +4855,7 @@ MG_EXPORT void GUIAPI GetBoundsRect (HDC hdc, RECT* pRect); /** * \fn BOOL GUIAPI RectVisible (HDC hdc, const RECT* pRect) - * \brief Checks whether the specified rectangle is visible. + * \brief Check whether the specified rectangle is visible. * * This function checks whether the rectangle pointed to by \a pRect is * visible, i.e. it is intersected with the current visible region of the @@ -5780,7 +5780,7 @@ static inline void InflateRectToPt (RECT* prc, int x, int y) /** * \fn BOOL PtInRect(const RECT* prc, int x, int y) - * \brief Determines whether a point lies within an rectangle. + * \brief Determine whether a point lies within an rectangle. * * This function determines whether the specified point \a (x,y) lies within * the specified rectangle \a prc. @@ -5802,7 +5802,7 @@ static inline BOOL PtInRect(const RECT* prc, int x, int y) /** * \fn BOOL GUIAPI IsRectEmpty (const RECT* prc) - * \brief Determines whether an rectangle is empty. + * \brief Determine whether an rectangle is empty. * * This function determines whether the specified rectangle \a prc is empty. * An empty rectangle is one that has no area; that is, the coordinates @@ -5816,7 +5816,7 @@ MG_EXPORT BOOL GUIAPI IsRectEmpty (const RECT* prc); /** * \fn BOOL GUIAPI EqualRect (const RECT* prc1, const RECT* prc2) - * \brief Determines whether two rectangles are equal. + * \brief Determine whether two rectangles are equal. * * This function determines whether the two specified rectangles * (\a prc1 and \a prc2) are equal by comparing the coordinates of @@ -5864,7 +5864,7 @@ MG_EXPORT BOOL GUIAPI IntersectRect (RECT* pdrc, /** * \fn BOOL GUIAPI IsCovered (const RECT* prc1, const RECT* prc2) - * \brief Determines whether one rectangle is covered by another. + * \brief Determine whether one rectangle is covered by another. * * This function determines whether one rectangle (\a prc1) * is covered by another rectangle (\a prc2). @@ -5881,7 +5881,7 @@ MG_EXPORT BOOL GUIAPI IsCovered (const RECT* prc1, const RECT* prc2); /** * \fn BOOL GUIAPI DoesIntersect (const RECT* psrc1, const RECT* psrc2) - * \brief Determines whether two rectangles intersect. + * \brief Determine whether two rectangles intersect. * * This function determines whether two rectangles (\a psrc1 and \a psrc2) * intersect. @@ -10017,10 +10017,10 @@ MG_EXPORT Uchar32 GUIAPI UCharToFullSizeKana (Uchar32 uc); /** Converts a glyph to small Kana. */ MG_EXPORT Uchar32 GUIAPI UCharToSmallKana (Uchar32 uc); -/** Determines is the given Unicode character an Arabic vowel. */ +/** Determine is the given Unicode character an Arabic vowel. */ MG_EXPORT BOOL GUIAPI UCharIsArabicVowel(Uchar32 uc); -/** Determines the canonical combining class of a Unicode character.*/ +/** Determine the canonical combining class of a Unicode character.*/ MG_EXPORT int GUIAPI UCharCombiningClass (Uchar32 uc); /** @@ -10744,7 +10744,7 @@ typedef struct _DTFIRSTLINE * Draws without clipping. \a DrawText is somewhat faster when DT_NOCLIP is * used. * - DT_CALCRECT\n - * Determines the width and the height of the rectangle. If there are + * Determine the width and the height of the rectangle. If there are * multiple lines of text, \a DrawText uses the width of the rectangle * pointed to by the \a lpRect parameter and extends the base of the * rectangle to bound the last line of text. If there is only one line of @@ -11023,7 +11023,7 @@ MG_EXPORT BOOL GUIAPI RegisterBitmapFileType (const char *ext, /** * \fn const char* GUIAPI CheckBitmapType (MG_RWops* fp) - * \brief Checks the type of the bitmap in a data source. + * \brief Check the type of the bitmap in a data source. * * This function checks the type of the bitmap in the data source \a fp, * and returns the extension of this type of bitmap file. diff --git a/src/gui/lf_test/configure.in b/src/gui/lf_test/configure.in index e89bfb41..c45c6ec4 100644 --- a/src/gui/lf_test/configure.in +++ b/src/gui/lf_test/configure.in @@ -9,22 +9,22 @@ AC_CONFIG_SRCDIR([src/test_window.c]) dnl AC_CONFIG_HEADERS([config.h]) dnl ======================================================================== -dnl Checks for programs. +dnl Check for programs. AC_PROG_MAKE_SET AC_PROG_CC -# Checks for library functions. +# Check for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([strcspn strspn]) dnl ======================================================================== -dnl Checks for typedefs, structures, and compiler characteristics. +dnl Check for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE dnl ======================================================================== -dnl Checks for header files. +dnl Check for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME diff --git a/src/ial/linux-tty.c b/src/ial/linux-tty.c index 5c95830f..298f9223 100644 --- a/src/ial/linux-tty.c +++ b/src/ial/linux-tty.c @@ -104,7 +104,7 @@ static void vt_switch_requested(int signo) return; } - /* Checks whether a switch is needed and not blocked */ + /* Check whether a switch is needed and not blocked */ if (console_active == console_should_be_active) return; diff --git a/src/ial/native/vtswitch-lite.c b/src/ial/native/vtswitch-lite.c index 62107e8f..d2fd3ce7 100644 --- a/src/ial/native/vtswitch-lite.c +++ b/src/ial/native/vtswitch-lite.c @@ -157,7 +157,7 @@ static void vt_switch_requested(int signo) } /* poll_console_switch: - * Checks whether a switch is needed and not blocked; if so, + * Check whether a switch is needed and not blocked; if so, * makes the switch. */ static void poll_console_switch (void) diff --git a/src/newgdi/flood.c b/src/newgdi/flood.c index 5989829d..796c490b 100644 --- a/src/newgdi/flood.c +++ b/src/newgdi/flood.c @@ -151,7 +151,7 @@ static int flooder (FLOODER_INFO* fi, int x, int y) } /* check_flood_line: - * Checks a line segment, using the scratch buffer is to store a list of + * Check a line segment, using the scratch buffer is to store a list of * segments which have already been drawn in order to minimise the required * number of tests. */ diff --git a/src/newgdi/layout-ellipsize.c b/src/newgdi/layout-ellipsize.c index e3e47bf9..a2a4e9b1 100644 --- a/src/newgdi/layout-ellipsize.c +++ b/src/newgdi/layout-ellipsize.c @@ -272,7 +272,7 @@ static BOOL line_iter_prev_cluster (EllipsizeState *state, LineIter *iter) * */ -/* Checks if there is a ellipsization boundary before +/* Check if there is a ellipsization boundary before * the cluster @iter points to */ static BOOL starts_at_ellipsization_boundary (EllipsizeState *state, @@ -288,7 +288,7 @@ static BOOL starts_at_ellipsization_boundary (EllipsizeState *state, return state->layout->bos[index] & BOV_GB_CURSOR_POS; } -/* Checks if there is a ellipsization boundary after the cluster @iter points to +/* Check if there is a ellipsization boundary after the cluster @iter points to */ static BOOL ends_at_ellipsization_boundary(EllipsizeState *state, LineIter *iter)