1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Remove toupper from lexer.c replace by glib equiv.

This commit is contained in:
Dave Davenport 2017-06-02 22:33:55 +02:00
parent 218886f897
commit bac92616d3
2 changed files with 2 additions and 4 deletions

View file

@ -101,7 +101,6 @@ AC_CHECK_FUNC([fcntl],, AC_MSG_ERROR("Could not find fcntl"))
AC_CHECK_FUNC([setlocale],,AC_MSG_ERROR("Could not find setlocale")) AC_CHECK_FUNC([setlocale],,AC_MSG_ERROR("Could not find setlocale"))
AC_CHECK_FUNC([atexit],, AC_MSG_ERROR("Could not find atexit in c library")) AC_CHECK_FUNC([atexit],, AC_MSG_ERROR("Could not find atexit in c library"))
AC_CHECK_FUNC([glob],, AC_MSG_ERROR("Could not find glob in c library")) AC_CHECK_FUNC([glob],, AC_MSG_ERROR("Could not find glob in c library"))
AC_CHECK_FUNC([toupper],, AC_MSG_ERROR("Could not find toupper in c library"))
AC_CHECK_HEADER([math.h],, AC_MSG_ERROR("Could not find math.h header file")) AC_CHECK_HEADER([math.h],, AC_MSG_ERROR("Could not find math.h header file"))
AC_SEARCH_LIBS([floor],[m],, AC_MSG_ERROR("Could not find floor in math library")) AC_SEARCH_LIBS([floor],[m],, AC_MSG_ERROR("Could not find floor in math library"))

View file

@ -37,7 +37,6 @@
#include <gio/gio.h> #include <gio/gio.h>
#include <helper.h> #include <helper.h>
#include <math.h> #include <math.h>
#include <ctype.h>
#include <strings.h> #include <strings.h>
#include "rofi.h" #include "rofi.h"
#include "theme.h" #include "theme.h"
@ -92,10 +91,10 @@ static double rofi_theme_parse_convert_hex ( char high, char low)
{ {
uint8_t retv = 0; uint8_t retv = 0;
int t = toupper(high); int t = g_ascii_toupper ( high );
t = ( t > '9')? (t-'A'+10):(t-'0'); t = ( t > '9')? (t-'A'+10):(t-'0');
retv = t<<4; retv = t<<4;
t = toupper ( low ); t = g_ascii_toupper ( low );
t = ( t > '9')? (t-'A'+10):(t-'0'); t = ( t > '9')? (t-'A'+10):(t-'0');
retv +=t; retv +=t;
return retv/255.0; return retv/255.0;