nitpicker: Remove local string.h
This commit is contained in:
parent
a6c019e0c6
commit
74242c0906
|
@ -55,7 +55,7 @@ static void draw_frame(Canvas &canvas, Rect r, Color color, int frame_size)
|
||||||
|
|
||||||
void View::title(const char *title)
|
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 */
|
/* calculate label size, the position is defined by the view stack */
|
||||||
_label_rect = Rect(Point(0, 0), label_size(_session.label(), _title));
|
_label_rect = Rect(Point(0, 0), label_size(_session.label(), _title));
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
|
|
||||||
/* Genode includes */
|
/* Genode includes */
|
||||||
#include <util/list.h>
|
#include <util/list.h>
|
||||||
|
#include <util/string.h>
|
||||||
/* local includes */
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
class Texture;
|
class Texture;
|
||||||
class View;
|
class View;
|
||||||
|
@ -70,7 +68,7 @@ class Session : public Session_list::Element
|
||||||
:
|
:
|
||||||
_color(color), _texture(texture), _background(0),
|
_color(color), _texture(texture), _background(0),
|
||||||
_v_offset(v_offset), _input_mask(input_mask), _stay_top(stay_top) {
|
_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() { }
|
virtual ~Session() { }
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -14,12 +14,12 @@
|
||||||
#ifndef _VIEW_H_
|
#ifndef _VIEW_H_
|
||||||
#define _VIEW_H_
|
#define _VIEW_H_
|
||||||
|
|
||||||
|
#include <util/string.h>
|
||||||
#include <nitpicker_gfx/canvas.h>
|
#include <nitpicker_gfx/canvas.h>
|
||||||
#include <nitpicker_gfx/geometry.h>
|
#include <nitpicker_gfx/geometry.h>
|
||||||
|
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "mode.h"
|
#include "mode.h"
|
||||||
#include "string.h"
|
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
|
|
||||||
class Buffer;
|
class Buffer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user