Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155177 | Differences between
and this patch

Collapse All | Expand All

(-)configure.ac.orig (-1 / +2 lines)
Lines 54-60 Link Here
54
dnl ncurses
54
dnl ncurses
55
AC_CHECK_LIB([ncurses], 
55
AC_CHECK_LIB([ncurses], 
56
	     [initscr],
56
	     [initscr],
57
             [LIBS="$LIBS -lncurses"], 
57
             [LIBS="$LIBS -lncursesw"], 
58
             [AC_MSG_ERROR(ncurses library is required)])
58
             [AC_MSG_ERROR(ncurses library is required)])
59
59
60
60
Lines 216-221 Link Here
216
AC_DEFINE_UNQUOTED([DEFAULT_PORT],     [$DEFAULT_PORT],   [Default MPD port])
216
AC_DEFINE_UNQUOTED([DEFAULT_PORT],     [$DEFAULT_PORT],   [Default MPD port])
217
AC_DEFINE_UNQUOTED([DEFAULT_PORT_STR], ["$DEFAULT_PORT"], [Default MPD port])
217
AC_DEFINE_UNQUOTED([DEFAULT_PORT_STR], ["$DEFAULT_PORT"], [Default MPD port])
218
218
219
AC_DEFINE([xstrlen(x)], [mbstowcs(NULL,x,0)], [utf-8 hack])
219
220
220
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile po/Makefile.in])
221
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile po/Makefile.in])
221
AC_OUTPUT
222
AC_OUTPUT
(-)src/list_window.c.orig (-1 / +1 lines)
Lines 196-202 Link Here
196
      if( label )
196
      if( label )
197
	{
197
	{
198
	  int selected = lw->start+i == lw->selected;
198
	  int selected = lw->start+i == lw->selected;
199
	  size_t len = strlen(label);
199
	  size_t len = xstrlen(label);
200
200
201
	  if( highlight )
201
	  if( highlight )
202
	    colors_use(lw->w, COLOR_LIST_BOLD);
202
	    colors_use(lw->w, COLOR_LIST_BOLD);
(-)src/screen.c.orig (-8 / +8 lines)
Lines 141-149 Link Here
141
  static int prev_header_len = -1;
141
  static int prev_header_len = -1;
142
  WINDOW *w = screen->top_window.w;
142
  WINDOW *w = screen->top_window.w;
143
143
144
  if(prev_header_len!=strlen(header))
144
  if(prev_header_len!=xstrlen(header))
145
    {
145
    {
146
      prev_header_len = strlen(header);
146
      prev_header_len = xstrlen(header);
147
      clear = 1;
147
      clear = 1;
148
    }
148
    }
149
149
Lines 192-198 Link Here
192
	  g_snprintf(buf, 32, _(" Volume %d%%"), c->status->volume); 
192
	  g_snprintf(buf, 32, _(" Volume %d%%"), c->status->volume); 
193
	}
193
	}
194
      colors_use(w, COLOR_TITLE);
194
      colors_use(w, COLOR_TITLE);
195
      mvwaddstr(w, 0, screen->top_window.cols-strlen(buf), buf);
195
      mvwaddstr(w, 0, screen->top_window.cols-xstrlen(buf), buf);
196
196
197
      flags[0] = 0;
197
      flags[0] = 0;
198
      if( c->status->repeat )
198
      if( c->status->repeat )
Lines 207-213 Link Here
207
      mvwhline(w, 1, 0, ACS_HLINE, screen->top_window.cols);
207
      mvwhline(w, 1, 0, ACS_HLINE, screen->top_window.cols);
208
      if( flags[0] )
208
      if( flags[0] )
209
	{
209
	{
210
	  wmove(w,1,screen->top_window.cols-strlen(flags)-3);
210
	  wmove(w,1,screen->top_window.cols-xstrlen(flags)-3);
211
	  waddch(w, '[');
211
	  waddch(w, '[');
212
	  colors_use(w, COLOR_LINE_BOLD);
212
	  colors_use(w, COLOR_LINE_BOLD);
213
	  waddstr(w, flags);
213
	  waddstr(w, flags);
Lines 281-287 Link Here
281
  if( str )
281
  if( str )
282
    {
282
    {
283
      waddstr(w, str);
283
      waddstr(w, str);
284
      x += strlen(str)+1;
284
      x += xstrlen(str)+1;
285
    }
285
    }
286
286
287
  /* create time string */
287
  /* create time string */
Lines 315-321 Link Here
315
  if( (IS_PLAYING(status->state) || IS_PAUSED(status->state)) )
315
  if( (IS_PLAYING(status->state) || IS_PAUSED(status->state)) )
316
    {
316
    {
317
      char songname[MAX_SONGNAME_LENGTH];
317
      char songname[MAX_SONGNAME_LENGTH];
318
      int width = COLS-x-strlen(screen->buf);
318
      int width = COLS-x-xstrlen(screen->buf);
319
319
320
      if( song )
320
      if( song )
321
	strfsong(songname, MAX_SONGNAME_LENGTH, STATUS_FORMAT, song);
321
	strfsong(songname, MAX_SONGNAME_LENGTH, STATUS_FORMAT, song);
Lines 324-330 Link Here
324
324
325
      colors_use(w, COLOR_STATUS);
325
      colors_use(w, COLOR_STATUS);
326
      /* scroll if the song name is to long */
326
      /* scroll if the song name is to long */
327
      if( strlen(songname) > width )
327
      if( xstrlen(songname) > width )
328
	{
328
	{
329
	  static  scroll_state_t st = { 0, 0 };
329
	  static  scroll_state_t st = { 0, 0 };
330
	  char *tmp = strscroll(songname, " *** ", width, &st);
330
	  char *tmp = strscroll(songname, " *** ", width, &st);
Lines 338-344 Link Here
338
  /* display time string */
338
  /* display time string */
339
  if( screen->buf[0] )
339
  if( screen->buf[0] )
340
    {
340
    {
341
      x = screen->status_window.cols - strlen(screen->buf);
341
      x = screen->status_window.cols - xstrlen(screen->buf);
342
      colors_use(w, COLOR_STATUS_TIME);
342
      colors_use(w, COLOR_STATUS_TIME);
343
      mvwaddstr(w, 0, x, screen->buf);
343
      mvwaddstr(w, 0, x, screen->buf);
344
    }
344
    }
(-)src/screen_clock.c.orig (-2 / +2 lines)
Lines 169-175 Link Here
169
  if( win.rows<=YDEPTH+1 || win.cols<=XLENGTH+1 )
169
  if( win.rows<=YDEPTH+1 || win.cols<=XLENGTH+1 )
170
    {
170
    {
171
      strftime(buf, BUFSIZE, "%X ",tm);
171
      strftime(buf, BUFSIZE, "%X ",tm);
172
      mvwaddstr(win.w, win.rows ? win.rows/2:0, (win.cols-strlen(buf))/2, buf);
172
      mvwaddstr(win.w, win.rows ? win.rows/2:0, (win.cols-xstrlen(buf))/2, buf);
173
      wrefresh(win.w);
173
      wrefresh(win.w);
174
      return;
174
      return;
175
    }
175
    }
Lines 221-227 Link Here
221
  strcpy(buf, ctime(&now));
221
  strcpy(buf, ctime(&now));
222
  strcpy(buf + 10, buf + 19);
222
  strcpy(buf + 10, buf + 19);
223
#endif
223
#endif
224
  mvwaddstr(win.w, YBASE+YDEPTH+1, (win.cols-strlen(buf))/2, buf);
224
  mvwaddstr(win.w, YBASE+YDEPTH+1, (win.cols-xstrlen(buf))/2, buf);
225
  
225
  
226
  wmove(win.w, 6, 0);
226
  wmove(win.w, 6, 0);
227
  drawbox();
227
  drawbox();
(-)src/screen_play.c.orig (-2 / +2 lines)
Lines 233-239 Link Here
233
	  list = gcmp_list_from_path(c, "", NULL, GCMP_TYPE_RFILE);
233
	  list = gcmp_list_from_path(c, "", NULL, GCMP_TYPE_RFILE);
234
	  g_completion_add_items(gcmp, list);
234
	  g_completion_add_items(gcmp, list);
235
	}
235
	}
236
      else if( line && line[0] && line[strlen(line)-1]=='/' &&
236
      else if( line && line[0] && line[xstrlen(line)-1]=='/' &&
237
	       string_list_find(dir_list, line) == NULL )
237
	       string_list_find(dir_list, line) == NULL )
238
	{	  
238
	{	  
239
	  /* add directory content to list */
239
	  /* add directory content to list */
Lines 251-257 Link Here
251
	  lw->repaint = 1;
251
	  lw->repaint = 1;
252
	}
252
	}
253
253
254
      if( line && line[0] && line[strlen(line)-1]=='/' &&
254
      if( line && line[0] && line[xstrlen(line)-1]=='/' &&
255
	  string_list_find(dir_list, line) == NULL )
255
	  string_list_find(dir_list, line) == NULL )
256
	{	  
256
	{	  
257
	  /* add directory content to list */
257
	  /* add directory content to list */
(-)src/screen_utils.c.orig (-1 / +1 lines)
Lines 51-57 Link Here
51
screen_getch(WINDOW *w, char *prompt)
51
screen_getch(WINDOW *w, char *prompt)
52
{
52
{
53
  int key = -1;
53
  int key = -1;
54
  int prompt_len = strlen(prompt);
54
  int prompt_len = xstrlen(prompt);
55
55
56
  colors_use(w, COLOR_STATUS_ALERT);
56
  colors_use(w, COLOR_STATUS_ALERT);
57
  wclear(w);  
57
  wclear(w);  
(-)src/wreadln.c.orig (-5 / +5 lines)
Lines 61-67 Link Here
61
61
62
  /* move the cursor one step to the right */
62
  /* move the cursor one step to the right */
63
  void cursor_move_right(void) {
63
  void cursor_move_right(void) {
64
    if( cursor < strlen(line) && cursor<wrln_max_line_size-1 )
64
    if( cursor < xstrlen(line) && cursor<wrln_max_line_size-1 )
65
      {
65
      {
66
	cursor++;
66
	cursor++;
67
	if( cursor+x0 >= x1 && start<cursor-width+1)
67
	if( cursor+x0 >= x1 && start<cursor-width+1)
Lines 79-85 Link Here
79
  }
79
  }
80
 /* move the cursor to the end of the line */
80
 /* move the cursor to the end of the line */
81
  void cursor_move_to_eol(void) {
81
  void cursor_move_to_eol(void) {
82
    cursor = strlen(line);
82
    cursor = xstrlen(line);
83
    if( cursor+x0 >= x1 )
83
    if( cursor+x0 >= x1 )
84
      start = cursor-width+1;
84
      start = cursor-width+1;
85
  }
85
  }
Lines 247-253 Link Here
247
	  break;
247
	  break;
248
	case KEY_DC:		/* handle delete key. As above */
248
	case KEY_DC:		/* handle delete key. As above */
249
	case KEY_CTRL_D:
249
	case KEY_CTRL_D:
250
	  if( cursor <= strlen(line) - 1 ) 
250
	  if( cursor <= xstrlen(line) - 1 ) 
251
	    {
251
	    {
252
	      for (i = cursor; line[i] != 0; i++)
252
	      for (i = cursor; line[i] != 0; i++)
253
		line[i] = line[i + 1];
253
		line[i] = line[i + 1];
Lines 290-296 Link Here
290
	default:	 
290
	default:	 
291
	  if (key >= 32)
291
	  if (key >= 32)
292
	    {
292
	    {
293
	      if (strlen (line + cursor))	/* if the cursor is */
293
	      if (xstrlen (line + cursor))	/* if the cursor is */
294
		{		                /* not at the last pos */
294
		{		                /* not at the last pos */
295
		  gchar *tmp = 0;
295
		  gchar *tmp = 0;
296
		  gsize size = strlen(line + cursor) + 1;
296
		  gsize size = strlen(line + cursor) + 1;
Lines 318-324 Link Here
318
  /* update history */
318
  /* update history */
319
  if( history )
319
  if( history )
320
    {
320
    {
321
      if( strlen(line) )
321
      if( xstrlen(line) )
322
	{
322
	{
323
	  /* update the current history entry */
323
	  /* update the current history entry */
324
	  size_t size = strlen(line)+1;
324
	  size_t size = strlen(line)+1;

Return to bug 155177