escape non ascii chars to HEX \xNN in C source (not in comments)

add "" where needed.

also fix extra space at end of lines (only in modified files)
This commit is contained in:
Thomas Bernard 2018-06-26 10:49:33 +02:00
parent b8ac772922
commit 6731a57999
9 changed files with 801 additions and 801 deletions

View File

@ -926,7 +926,7 @@ void Rotate_brush_12_0(void)
Operation_push(1); // State précédent
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("Angle: 0° ",0);
Print_in_menu("Angle: 0\xb0 ",0);
}
else
{

View File

@ -3936,8 +3936,8 @@ void Button_Brush_FX(int btn)
Window_set_normal_button(236,141, 67,14,"Cancel" ,0,1,KEY_ESC); // 1
Window_set_normal_button( 19, 46, 27,14,"X\035" ,0,1,Config_Key[SPECIAL_FLIP_X][0]); // 2
Window_set_normal_button( 19, 61, 27,14,"Y\022" ,0,1,Config_Key[SPECIAL_FLIP_Y][0]); // 3
Window_set_normal_button( 58, 46, 37,14,"90°" ,0,1,Config_Key[SPECIAL_ROTATE_90][0]); // 4
Window_set_normal_button( 96, 46, 37,14,"180°" ,0,1,Config_Key[SPECIAL_ROTATE_180][0]); // 5
Window_set_normal_button( 58, 46, 37,14,"90\xb0" ,0,1,Config_Key[SPECIAL_ROTATE_90][0]); // 4
Window_set_normal_button( 96, 46, 37,14,"180\xb0" ,0,1,Config_Key[SPECIAL_ROTATE_180][0]); // 5
Window_set_normal_button( 58, 61, 75,14,"any angle" ,0,1,Config_Key[SPECIAL_ROTATE_ANY_ANGLE][0]); // 6
Window_set_normal_button(145, 46, 67,14,"Stretch" ,0,1,Config_Key[SPECIAL_STRETCH][0]); // 7
Window_set_normal_button(145, 61, 67,14,"Distort" ,0,1,Config_Key[SPECIAL_DISTORT][0]); // 8
@ -4193,7 +4193,7 @@ void Button_Airbrush_menu(int btn)
Window_set_normal_button(194, 62,19,14,"+1" ,0,1,SDLK_KP_PLUS); // 6
Window_set_normal_button(194, 79,19,14,"-1" ,0,1,SDLK_KP_MINUS); // 7
Window_set_normal_button(194, 96,19,14,"x2" ,0,1,SDLK_KP_MULTIPLY); // 8
Window_set_normal_button(194,113,19,14,"÷2" ,0,1,SDLK_KP_ENTER); // 9
Window_set_normal_button(194,113,19,14,"\xf7""2" ,0,1,SDLK_KP_ENTER); // 9
Window_set_normal_button( 8, 37,43,14,"Clear" ,1,1,SDLK_c); // 10

View File

@ -203,8 +203,8 @@ static const T_Help_table helptable_help[] =
HELP_LINK ("Restore brush: %s", 0x200+BUTTON_BRUSH)
HELP_LINK ("Flip brush X: %s", SPECIAL_FLIP_X)
HELP_LINK ("Flip brush Y: %s", SPECIAL_FLIP_Y)
HELP_LINK ("90° brush rotation: %s", SPECIAL_ROTATE_90)
HELP_LINK ("180° brush rotation: %s", SPECIAL_ROTATE_180)
HELP_LINK ("90\xb0 brush rotation: %s", SPECIAL_ROTATE_90)
HELP_LINK ("180\xb0 brush rotation: %s", SPECIAL_ROTATE_180)
HELP_LINK ("Stretch brush: %s", SPECIAL_STRETCH)
HELP_LINK ("Distort brush: %s", SPECIAL_DISTORT)
HELP_LINK ("Outline brush: %s", SPECIAL_OUTLINE)
@ -456,7 +456,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT ("")
HELP_BOLD (" FREEBSD PORT")
HELP_TEXT ("")
HELP_TEXT (" Jean-Baptiste Berlioz (Tobé)")
HELP_TEXT (" Jean-Baptiste Berlioz (Tob\xe9)")
HELP_TEXT ("")
HELP_BOLD (" OPENBSD PORT")
HELP_TEXT ("")
@ -470,7 +470,7 @@ static const T_Help_table helptable_credits[] =
HELP_BOLD (" LINUX BINARIES")
HELP_TEXT ("")
HELP_TEXT (" Gentoo : Matteo 'Peach' Pescarin")
HELP_TEXT (" Debian : Gürkan Sengün")
HELP_TEXT (" Debian : G\xfcrkan Seng\xfcn")
HELP_TEXT (" Android : pelya")
HELP_TEXT ("")
HELP_BOLD (" WIZ & CAANOO PORT")
@ -495,7 +495,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" DarkDefende DawnBringer El Topo ")
HELP_TEXT (" falenblood fanickbux fano ")
HELP_TEXT (" finticemo fogbot121 freehand ")
HELP_TEXT (" Frost Grimmy Gürkan Sengün")
HELP_TEXT (" Frost Grimmy G\xfcrkan Seng\xfcn")
HELP_TEXT (" Hatch HoraK-FDF iLKke ")
HELP_TEXT (" Iw2evk jackfrost128 Jamon ")
HELP_TEXT (" keito kusma lmemsm ")
@ -506,7 +506,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" Ravey1138 richienyhus rixard ")
HELP_TEXT (" sm4tik spratek Surt ")
HELP_TEXT (" tape.yrm TeeEmCee tempest ")
HELP_TEXT (" Timo Kurrpa titus^Rab Tobé ")
HELP_TEXT (" Timo Kurrpa titus^Rab Tob\xe9 ")
HELP_TEXT (" yakumo2975 00ai99")
HELP_TEXT (" ... posted the annoying bug reports.")
HELP_TEXT ("")
@ -564,7 +564,7 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" Acryl Fred Prowler")
HELP_TEXT (" Alexel FreddyV Puznik")
HELP_TEXT (" Alias Frost Quick")
HELP_TEXT (" Amiral Gaël(GDC) Ra")
HELP_TEXT (" Amiral Ga\xebl(GDC) Ra")
HELP_TEXT (" Arrakis GainX Raster")
HELP_TEXT (" Avocado Gandalf Ravian")
HELP_TEXT (" Baloo Goblin RedBug")
@ -575,10 +575,10 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT (" BlackAxe Haplo Sam")
HELP_TEXT (" Bonnie Hof SandMan")
HELP_TEXT (" Boo Hornet Scape")
HELP_TEXT (" Boz Hulud Sébastien")
HELP_TEXT (" Boz Hulud S\xe9""bastien")
HELP_TEXT (" Carine Java Shodan")
HELP_TEXT (" Chandra JBT Skal")
HELP_TEXT (" Cheetah Jérôme Skyfire")
HELP_TEXT (" Cheetah J\xe9r\xf4me Skyfire")
HELP_TEXT (" Chill Julien(JCA) Sphair")
HELP_TEXT (" Cougar KalMinDo Sprocket")
HELP_TEXT (" Cremax KaneWood Stef")
@ -793,7 +793,7 @@ static const T_Help_table helptable_adjust[] =
HELP_TEXT ("")
HELP_TEXT ("In 'Ratio' mode, you can set 2 numbers for")
HELP_TEXT ("each dimension, and the resizing factor will")
HELP_TEXT ("be of 'new'÷'old'. For example you can use")
HELP_TEXT ("be of 'new'\xf7'old'. For example you can use")
HELP_TEXT ("1:3 to divide the image by three, 2:1 to")
HELP_TEXT ("double it, and any fraction like 15:16.")
HELP_TEXT ("")
@ -810,12 +810,12 @@ static const T_Help_table helptable_adjust[] =
HELP_TEXT ("")
HELP_BOLD ("ROTATE")
HELP_TEXT ("")
HELP_TEXT ("-90°: Rotates the image by 90°")
HELP_TEXT ("-90\xb0: Rotates the image by 90\xb0")
HELP_TEXT (" clockwise.")
HELP_TEXT ("")
HELP_TEXT ("+90°: Rotates the image by 90°")
HELP_TEXT ("+90\xb0: Rotates the image by 90\xb0")
HELP_TEXT (" counter-clockwise.")
HELP_TEXT ("180°: Rotates the image by 180°")
HELP_TEXT ("180\xb0: Rotates the image by 180\xb0")
HELP_TEXT ("")
HELP_TEXT ("")
};
@ -1301,10 +1301,10 @@ static const T_Help_table helptable_brush_fx[] =
HELP_LINK ("- Y: (Key:%s)",SPECIAL_FLIP_Y)
HELP_TEXT ("Flip vertically.")
HELP_TEXT ("")
HELP_LINK ("- Rotate by 90°: (Key:%s)",SPECIAL_ROTATE_90)
HELP_LINK ("- Rotate by 90\xb0: (Key:%s)",SPECIAL_ROTATE_90)
HELP_TEXT ("Rotates the brush by an angle of 90 degrees.")
HELP_TEXT ("")
HELP_LINK ("- Rotate by 180°: (Key:%s)",SPECIAL_ROTATE_180)
HELP_LINK ("- Rotate by 180\xb0: (Key:%s)",SPECIAL_ROTATE_180)
HELP_TEXT ("Rotates the brush by an angle of 180")
HELP_TEXT ("degrees.")
HELP_TEXT ("")

View File

@ -689,17 +689,17 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
SDLK_y, // Y
0},
{72,
"90° brush rotation",
"Rotate the user-defined brush by 90°",
"90\xb0 brush rotation",
"Rotate the user-defined brush by 90\xb0",
"(counter-clockwise).",
"",
true,
SDLK_z, // Z (W en AZERTY)
0},
{73,
"180° brush rotation",
"180\xb0 brush rotation",
"Rotate the user-defined brush by",
"180°.",
"180\xb0.",
"",
true,
SDLK_z|MOD_SHIFT, // Shift + Z

View File

@ -667,61 +667,61 @@ word Keysym_to_ANSI(SDL_keysym keysym)
switch(keysym.unicode)
{
case 0x8100:
return 'ü'; // ü
return '\xfc'; // ü
case 0x1A20:
return 'é'; // é
return '\xe9'; // é
case 0x201A:
return 'è'; // è
return '\xe8'; // è
case 0x9201:
return 'â'; // â
return '\xe2'; // â
case 0x1E20:
return 'ä'; // ä
return '\xe4'; // ä
case 0x2620:
return 'à'; // à
return '\xe0'; // à
case 0x2020:
return 'å'; // å
return '\xe5'; // å
case 0x2120:
return 'ç'; // ç
return '\xe7'; // ç
case 0xC602:
return 'ê'; // ê
return '\xea'; // ê
case 0x3020:
return 'ë'; // ë
return '\xeb'; // ë
case 0x6001:
return 'è'; // è
return '\xe8'; // è
case 0x3920:
return 'ï'; // ï
return '\xef'; // ï
case 0x5201:
return 'î'; // î
return '\xee'; // î
case 0x8D00:
return 'ì'; // ì
return '\xec'; // ì
case 0x1C20:
return 'ô'; // ô
return '\xf4'; // ô
case 0x1D20:
return 'ö'; // ö
return '\xf6'; // ö
case 0x2220:
return 'ò'; // ò
return '\xf2'; // ò
case 0x1320:
return 'û'; // û
return '\xfb'; // û
case 0x1420:
return 'ù'; // ù
return '\xf9'; // ù
case 0xDC02:
return 'ÿ'; // ÿ
return '\xff'; // ÿ
case 0x5301:
return '£'; // £
return '\xa3'; // £
case 0xA000:
return 'á'; // á
return '\xe1'; // á
case 0xA100:
return 'í'; // í
return '\xed'; // í
case 0xA200:
return 'ó'; // ó
return '\xf3'; // ó
case 0xA300:
return 'ú'; // ú
return '\xfa'; // ú
case 0xA400:
return 'ñ'; // ñ
return '\xf1'; // ñ
case 0xA700:
return 'º'; // º
return '\xba'; // º
case 0xC600:
return 'ã'; // ã
return '\xe3'; // ã
case 0x20AC:
return '\x80'; // Euro sign is 20AC in unicode, 80 in CP1252
}

View File

@ -169,7 +169,7 @@ void Display_coords_rel_or_abs(short start_x, short start_y)
str[0]='-';
}
else
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
Print_in_menu(str,2);
if (Paintbrush_Y>start_y)
@ -183,7 +183,7 @@ void Display_coords_rel_or_abs(short start_x, short start_y)
str[0]='-';
}
else
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
Print_in_menu(str,12);
}
}
@ -484,7 +484,7 @@ void Line_12_0(void)
}
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y);
@ -623,7 +623,7 @@ void K_line_12_0(void)
Pixel_figure_preview(Paintbrush_X,Paintbrush_Y,color);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K | 0x80);
Operation_push(color);
@ -697,7 +697,7 @@ void K_line_0_6(void)
Operation_pop(&direction);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Pixel_figure_preview_auto (start_x,start_y);
Hide_line_preview (start_x,start_y,end_x,end_y);
@ -1158,7 +1158,7 @@ void Ellipse_12_0(void)
}
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y);
@ -1495,7 +1495,7 @@ void Curve_34_points_1_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Fore_color);
Operation_push(Paintbrush_X);
@ -1526,7 +1526,7 @@ void Curve_34_points_2_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Back_color);
Operation_push(Paintbrush_X);
@ -2096,7 +2096,7 @@ void Polygon_12_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y);
@ -2204,7 +2204,7 @@ void Polyfill_12_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Paintbrush_X);
Operation_push(Paintbrush_Y);
@ -2240,7 +2240,7 @@ void Polyfill_0_8(void)
Operation_pop(&direction);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Draw_line_preview_xor(start_x,start_y,end_x,end_y,0);
@ -2826,7 +2826,7 @@ void Scroll_12_0(void)
Cursor_hidden_before_scroll=Cursor_hidden;
Cursor_hidden=1;
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
}
@ -3242,7 +3242,7 @@ void Grad_ellipse_12_0(void)
Update_part_of_screen(Paintbrush_X,Paintbrush_Y,1,1);
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K);
Operation_push(color);
@ -3896,7 +3896,7 @@ void Centered_lines_12_0(void)
Shade_table=(Mouse_K==LEFT_SIDE)?Shade_table_left:Shade_table_right;
if ((Config.Coords_rel) && (Menu_is_visible))
Print_in_menu("X:± 0 Y:± 0",0);
Print_in_menu("X:\xb1 0 Y:\xb1 0",0);
Operation_push(Mouse_K);
Operation_push(Paintbrush_X);

View File

@ -817,9 +817,9 @@ void Display_sliders(T_Scroller_button * red_slider,
if (block_is_selected)
{
Set_palette_slider(red_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_R_X);
Set_palette_slider(green_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_G_X);
Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"± 0",NUMERIC_B_X);
Set_palette_slider(red_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_R_X);
Set_palette_slider(green_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_G_X);
Set_palette_slider(blue_slider,Color_max*2+1,Color_max,"\xb1 0",NUMERIC_B_X);
}
else
{
@ -855,15 +855,15 @@ void Draw_all_palette_sliders(T_Scroller_button * red_slider,
// Dans le cas d'un bloc, tout à 0.
red_slider->Position =Color_max;
Window_draw_slider(red_slider);
Print_counter(NUMERIC_R_X,NUMERIC_Y,"± 0",MC_Black,MC_Light);
Print_counter(NUMERIC_R_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
green_slider->Position =Color_max;
Window_draw_slider(green_slider);
Print_counter(NUMERIC_G_X,NUMERIC_Y,"± 0",MC_Black,MC_Light);
Print_counter(NUMERIC_G_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
blue_slider->Position =Color_max;
Window_draw_slider(blue_slider);
Print_counter(NUMERIC_B_X,NUMERIC_Y,"± 0",MC_Black,MC_Light);
Print_counter(NUMERIC_B_X,NUMERIC_Y,"\xb1 0",MC_Black,MC_Light);
}
else
{
@ -1533,7 +1533,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -1614,7 +1614,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
}
@ -1695,7 +1695,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
}
@ -2111,7 +2111,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2132,7 +2132,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2153,7 +2153,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
}
@ -2237,7 +2237,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_R_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2258,7 +2258,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_G_X,NUMERIC_Y,str,MC_Black,MC_Light);
@ -2279,7 +2279,7 @@ void Button_Palette(int btn)
else
{
// Jauge nulle:
strcpy(str,"± 0");
strcpy(str,"\xb1 0");
}
Print_counter(NUMERIC_B_X,NUMERIC_Y,str,MC_Black,MC_Light);
}
@ -2927,7 +2927,7 @@ void Button_Secondary_palette(int btn)
Print_in_window(51,108,"Vertical",MC_Dark,MC_Light);
Window_set_normal_button(190,82,18,14,"x2" , 1,1,SDLK_x); // 9
Window_set_normal_button(137,82,18,14,"÷2" , 0,1,SDLK_w); // 10
Window_set_normal_button(137,82,18,14,"\xf7""2" , 0,1,SDLK_w); // 10
gamma_slider = Window_set_horizontal_scroller_button(137,110,71,30, 1,Gamma*10);// 11
Num2str(Gamma*10,str,2);

View File

@ -123,9 +123,9 @@ void Button_Transform_menu(int btn)
Window_set_normal_button( 17,140, 27,14,"Y\022" ,1,1,SDLK_y); // 3
Print_in_window( 84,114,"Rotate",MC_Dark,MC_Light);
Window_set_normal_button( 69,125, 37,14,"-90°" ,0,1,SDLK_LAST); // 4
Window_set_normal_button(107,125, 37,14,"+90°" ,0,1,SDLK_LAST); // 5
Window_set_normal_button( 69,140, 75,14,"180°" ,0,1,SDLK_LAST); // 6
Window_set_normal_button( 69,125, 37,14,"-90\xb0" ,0,1,SDLK_LAST); // 4
Window_set_normal_button(107,125, 37,14,"+90\xb0" ,0,1,SDLK_LAST); // 5
Window_set_normal_button( 69,140, 75,14,"180\xb0" ,0,1,SDLK_LAST); // 6
Print_in_window( 87, 19,"Resize",MC_Dark,MC_Light);
Window_set_normal_button( 80, 86, 60,14,"RESIZE",1,1,SDLK_r); // 7

View File

@ -1275,7 +1275,7 @@ void Print_counter(short x,short y,const char * str,byte text_color,byte backgro
case '-':
char_number=12;
break;
case '±':
case '\xb1':
char_number=13;
break;
}