Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename strings.h -> string_utils.h #154

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ project(NAppGUI)
set(NAPPGUI_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

# Configurations
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;ReleaseWithAssert" CACHE INTERNAL "Configuration Types" FORCE)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;ReleaseWithAssert;RelWithDebInfo" CACHE INTERNAL "Configuration Types" FORCE)
set(CMAKE_CXX_FLAGS_RELEASEWITHASSERT ${CMAKE_CXX_FLAGS_RELEASE})
set(CMAKE_C_FLAGS_RELEASEWITHASSERT ${CMAKE_C_FLAGS_RELEASE})
set(CMAKE_EXE_LINKER_FLAGS_RELEASEWITHASSERT ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
Expand Down
22 changes: 12 additions & 10 deletions prj/NAppCompilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -164,23 +164,25 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
nap_build_opt("DEPLOYMENT_TARGET_OSX" "${CMAKE_OSX_DEPLOYMENT_TARGET}")
nap_build_opt("DEPLOYMENT_TARGET_OSX_NAME" "${deploySDKName}")

string(REPLACE "macosx" "" base_sdk ${CMAKE_BASE_OSX_SDK})

# Invalid deployment target
if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER CMAKE_BASE_OSX_SDK)
if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER ${base_sdk})
message(FATAL_ERROR "Deployment target '${CMAKE_OSX_DEPLOYMENT_TARGET}' greater than base SDK '${CMAKE_BASE_OSX_SDK}'")
endif()

# Host architecture
if (CMAKE_HOST_SYSTEM_PROCESSOR)
nap_osx_arch(${CMAKE_HOST_SYSTEM_PROCESSOR} CMAKE_HOST_ARCHITECTURE)
else()
message(FATAL_ERROR "- Unknown 'CMAKE_HOST_SYSTEM_PROCESSOR'")
endif()
#if (CMAKE_HOST_SYSTEM_PROCESSOR)
# nap_osx_arch(${CMAKE_HOST_SYSTEM_PROCESSOR} CMAKE_HOST_ARCHITECTURE)
#else()
# message(FATAL_ERROR "- Unknown 'CMAKE_HOST_SYSTEM_PROCESSOR'")
#endif()

# Build architecture
if (NOT CMAKE_ARCHITECTURE)
set(CMAKE_ARCHITECTURE ${CMAKE_HOST_ARCHITECTURE})
endif()
nap_osx_build_arch(${CMAKE_ARCHITECTURE} CMAKE_OSX_ARCHITECTURES)
#if (NOT CMAKE_ARCHITECTURE)
# set(CMAKE_ARCHITECTURE ${CMAKE_HOST_ARCHITECTURE})
#endif()
#nap_osx_build_arch(${CMAKE_ARCHITECTURE} CMAKE_OSX_ARCHITECTURES)

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
include(${NAPPGUI_ROOT_PATH}/prj/NAppAppleClang.cmake)
Expand Down
11 changes: 6 additions & 5 deletions prj/NAppMacOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,25 @@
#------------------------------------------------------------------------------

function(nap_macos_sdk_name sdkVersion _ret)
string(REPLACE "macosx" "" sdkVersion ${sdkVersion})
# 14 = "Sonoma"
if (sdkVersion VERSION_GREATER "13.9999")
if (${sdkVersion} VERSION_GREATER "13.9999")
set(${_ret} "Sonoma" PARENT_SCOPE)

# 13 = "Ventura"
elseif (sdkVersion VERSION_GREATER "12.9999")
elseif (${sdkVersion} VERSION_GREATER "12.9999")
set(${_ret} "Ventura" PARENT_SCOPE)

# 12 = "Monterey"
elseif (sdkVersion VERSION_GREATER "11.9999")
elseif (${sdkVersion} VERSION_GREATER "11.9999")
set(${_ret} "Monterey" PARENT_SCOPE)

# 11 = "Big Sur"
elseif (sdkVersion VERSION_GREATER "10.9999")
elseif (${sdkVersion} VERSION_GREATER "10.9999")
set(${_ret} "Big Sur" PARENT_SCOPE)

# 10.15 = "Catalina"
elseif (sdkVersion VERSION_GREATER "10.14.9999")
elseif (${sdkVersion} VERSION_GREATER "10.14.9999")
set(${_ret} "Catalina" PARENT_SCOPE)

# 10.14 = "Mojave"
Expand Down
2 changes: 1 addition & 1 deletion src/core/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "heap.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include <sewer/blib.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/coreall.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
#include "setpt.h"
#include "setst.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include "tfilter.h"
#include <osbs/osbsall.h>
2 changes: 1 addition & 1 deletion src/core/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* Dates */

#include "date.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/btime.h>
#include <sewer/blib.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/dbind.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "buffer.h"
#include "heap.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/log.h>
#include <sewer/bmath.h>
#include <sewer/bmem.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "event.h"
#include "event.inl"
#include "heap.h"
#include "strings.h"
#include "string_utils.h"
#include <sewer/cassert.h>

struct _event_t
Expand Down
2 changes: 1 addition & 1 deletion src/core/heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "heap.h"
#include "heap.inl"
#include "strings.h"
#include "string_utils.h"
#include <osbs/osbs.h>
#include <osbs/bmutex.h>
#include <osbs/bthread.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "date.h"
#include "event.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/bfile.h>
#include <sewer/bstd.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/keybuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "keybuf.h"
#include "heap.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/log.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/lex.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "stream.inl"
#include "heap.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include <sewer/cassert.h>
#include <sewer/ptr.h>
#include <sewer/unicode.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/respack.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "heap.h"
#include "hfile.h"
#include "stream.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/bfile.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/core/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "stream.inl"
#include "lex.inl"
#include "heap.h"
#include "strings.h"
#include "string_utils.h"
#include <osbs/osbs.h>
#include <osbs/bfile.h>
#include <osbs/bsocket.h>
Expand Down
4 changes: 2 additions & 2 deletions src/core/strings.c → src/core/string_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* MIT Licence
* https://nappgui.com/en/legal/license.html
*
* File: strings.c
* File: string_utils.c
*
*/

/* UTF8 strings */

#include "strings.h"
#include "string_utils.h"
#include "arrpt.h"
#include "heap.h"
#include "stream.h"
Expand Down
2 changes: 1 addition & 1 deletion src/core/strings.h → src/core/string_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* MIT Licence
* https://nappgui.com/en/legal/license.html
*
* File: strings.h
* File: string_utils.h
*
*/

Expand Down
2 changes: 1 addition & 1 deletion src/core/tfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "tfilter.inl"
#include "date.h"
#include "strings.h"
#include "string_utils.h"
#include <sewer/cassert.h>
#include <sewer/unicode.h>

Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "color.h"
#include "draw2d.inl"
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/bmath.h>
#include <sewer/bstd.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/dctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "draw.h"
#include "color.h"
#include "font.h"
#include <core/strings.h>
#include <core/string_utils.h>
#include <geom2d/t2d.h>
#include <sewer/cassert.h>

Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/draw2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <core/core.h>
#include <core/dbindh.h>
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <osbs/log.h>
#include <sewer/blib.h>
#include <sewer/bmath.h>
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "font.inl"
#include "draw2d.inl"
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/gtk/osfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "draw2d.inl"
#include <core/arrpt.h>
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/gtk/osimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "draw2d_gtk.ixx"
#include <core/buffer.h>
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <core/stream.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <core/hfile.h>
#include <core/respackh.h>
#include <core/stream.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/imgutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "palette.h"
#include "pixbuf.h"
#include <core/buffer.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <core/stream.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/osx/osfont.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "draw2d.inl"
#include "draw.inl"
#include <core/arrpt.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>

#if !defined(__MACOS__)
Expand Down
2 changes: 1 addition & 1 deletion src/draw2d/win/osfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <core/arrpt.h>
#include <core/arrst.h>
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <osbs/osbs.h>
#include <sewer/cassert.h>
#include <sewer/unicode.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <geom2d/v2d.h>
#include <core/event.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/gui/combo.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <core/arrpt.h>
#include <core/event.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/gui/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <draw2d/guictx.h>
#include <core/event.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>
#include <sewer/unicode.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/gbind.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <core/arrpt.h>
#include <core/dbindh.h>
#include <core/event.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/bmath.h>
#include <sewer/bmem.h>
#include <sewer/bstd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <core/hfileh.h>
#include <core/respack.h>
#include <core/respackh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <osbs/bproc.h>
#include <osbs/bfile.h>
#include <osbs/log.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/guicontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "guicontrol.h"
#include "component.inl"
#include "view.inl"
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>

/*---------------------------------------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion src/gui/label.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <geom2d/s2d.h>
#include <core/event.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <core/event.h>
#include <core/heap.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/bmath.h>
#include <sewer/bmem.h>
#include <sewer/cassert.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/listbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <core/arrst.h>
#include <core/event.h>
#include <core/heap.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/bmath.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/menuitem.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <draw2d/image.h>
#include <core/event.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
2 changes: 1 addition & 1 deletion src/gui/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <geom2d/v2d.h>
#include <core/arrpt.h>
#include <core/objh.h>
#include <core/strings.h>
#include <core/string_utils.h>
#include <sewer/cassert.h>
#include <sewer/ptr.h>

Expand Down
Loading