Mercurial > aewl
comparison client.c @ 581:601842ee4484
applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line printage proposal for stdin reading.
author | arg@mig29 |
---|---|
date | Sun, 26 Nov 2006 14:26:53 +0100 |
parents | 787f6ae02f29 |
children | a75123ef4b5f |
comparison
equal
deleted
inserted
replaced
580:e9001b0f53bc | 581:601842ee4484 |
---|---|
359 if(!name.nitems) | 359 if(!name.nitems) |
360 XGetWMName(dpy, c->win, &name); | 360 XGetWMName(dpy, c->win, &name); |
361 if(!name.nitems) | 361 if(!name.nitems) |
362 return; | 362 return; |
363 if(name.encoding == XA_STRING) | 363 if(name.encoding == XA_STRING) |
364 strncpy(c->name, (char *)name.value, sizeof(c->name)); | 364 strncpy(c->name, (char *)name.value, sizeof c->name); |
365 else { | 365 else { |
366 if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success | 366 if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success |
367 && n > 0 && *list) | 367 && n > 0 && *list) |
368 { | 368 { |
369 strncpy(c->name, *list, sizeof(c->name)); | 369 strncpy(c->name, *list, sizeof c->name); |
370 XFreeStringList(list); | 370 XFreeStringList(list); |
371 } | 371 } |
372 } | 372 } |
373 XFree(name.value); | 373 XFree(name.value); |
374 } | 374 } |