diff --git a/os/src/server/nitpicker/common/view.cc b/os/src/server/nitpicker/common/view.cc index 27192d438..67aa0e416 100644 --- a/os/src/server/nitpicker/common/view.cc +++ b/os/src/server/nitpicker/common/view.cc @@ -55,7 +55,7 @@ static void draw_frame(Canvas &canvas, Rect r, Color color, int frame_size) void View::title(const char *title) { - Nitpicker::strncpy(_title, title, TITLE_LEN); + Genode::strncpy(_title, title, TITLE_LEN); /* calculate label size, the position is defined by the view stack */ _label_rect = Rect(Point(0, 0), label_size(_session.label(), _title)); diff --git a/os/src/server/nitpicker/include/session.h b/os/src/server/nitpicker/include/session.h index d40452632..cd768fa35 100644 --- a/os/src/server/nitpicker/include/session.h +++ b/os/src/server/nitpicker/include/session.h @@ -16,9 +16,7 @@ /* Genode includes */ #include - -/* local includes */ -#include "string.h" +#include class Texture; class View; @@ -70,7 +68,7 @@ class Session : public Session_list::Element : _color(color), _texture(texture), _background(0), _v_offset(v_offset), _input_mask(input_mask), _stay_top(stay_top) { - Nitpicker::strncpy(_label, label, sizeof(_label)); } + Genode::strncpy(_label, label, sizeof(_label)); } virtual ~Session() { } diff --git a/os/src/server/nitpicker/include/string.h b/os/src/server/nitpicker/include/string.h deleted file mode 100644 index 57fe00f76..000000000 --- a/os/src/server/nitpicker/include/string.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * \brief Nitpicker string functions - * \author Norman Feske - * \date 2006-08-09 - * - * These custom versions of standard string functions are provided - * to make Nitpicker independent from the C library. Note that the - * functions are not 100% compatible with their libC counterparts. - */ - -/* - * Copyright (C) 2006-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#ifndef _STRING_H_ -#define _STRING_H_ - -namespace Nitpicker { - - inline void strncpy(char *dst, const char *src, unsigned n) - { - unsigned i; - for (i = 0; (i + 1 < n) && src[i]; i++) - dst[i] = src[i]; - - /* null-terminate string */ - if (n > 0) dst[i] = 0; - } -} - -#endif diff --git a/os/src/server/nitpicker/include/view.h b/os/src/server/nitpicker/include/view.h index 2794948b8..5eb2f8f7e 100644 --- a/os/src/server/nitpicker/include/view.h +++ b/os/src/server/nitpicker/include/view.h @@ -14,12 +14,12 @@ #ifndef _VIEW_H_ #define _VIEW_H_ +#include #include #include #include "list.h" #include "mode.h" -#include "string.h" #include "session.h" class Buffer;