mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-05 17:59:58 +08:00
cleanup: convert tab to spaces and trim tail spaces
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
tab2space() {
|
||||
sed -i 's/\t/ /g' `find . -name '*.c'`
|
||||
sed -i 's/\t/ /g' `find . -name '*.h'`
|
||||
|
||||
sed -i 's/\s\+$//g' `find . -name '*.c'`
|
||||
sed -i 's/\s\+$//g' `find . -name '*.h'`
|
||||
}
|
||||
|
||||
# templates
|
||||
# sed -i 's/\<AAA\>/__AAA/g' `grep AAA -rl include/ src/`
|
||||
# sed -i 's/\<AAA\>/__mgAAA/g' `grep AAA -rl include/ src/`
|
||||
@@ -41,4 +49,6 @@
|
||||
# sed -i 's/\<sysres_init_inner_resource\>/__sysres_init_inner_resource/g' `grep sysres_init_inner_resource -rl include/ src/`
|
||||
# sed -i 's/\<sysres_get_system_res_path\>/__sysres_get_system_res_path/g' `grep sysres_get_system_res_path -rl include/ src/`
|
||||
|
||||
tab2space
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -284,7 +284,7 @@ void miFillSppPoly (PDC pdc, int count, SppPointPtr ptsIn, int xTrans, int yTran
|
||||
DEALLOCATE_LOCAL(FirstPoint);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Find the index of the point with the smallest y.also return the
|
||||
* smallest and largest y */
|
||||
static int GetFPolyYBounds(register SppPointPtr pts, int n, double yFtrans, int* by, int* ty)
|
||||
|
||||
@@ -266,14 +266,14 @@ static void _parallelogram_map(HDC hdc, const BITMAP *bmp, fixed sx[4],
|
||||
|
||||
if (index < 2)
|
||||
corner_bmp_y[i] = 0;
|
||||
else
|
||||
/* Need `- 1' since otherwise it would be outside bitmap. */
|
||||
else /* Need `- 1' since otherwise it would be outside bitmap. */
|
||||
corner_bmp_y[i] = (bmp_h << 16) - 1;
|
||||
|
||||
if ((index == 0) || (index == 3))
|
||||
corner_bmp_x[i] = 0;
|
||||
else
|
||||
corner_bmp_x[i] = (bmp_w << 16) - 1;
|
||||
|
||||
index = (index + right_index) & 3;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user