ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xpm.C
(Generate patch)

Comparing rxvt-unicode/src/xpm.C (file contents):
Revision 1.3 by pcg, Tue Nov 25 11:52:42 2003 UTC vs.
Revision 1.4 by pcg, Thu Dec 18 02:07:12 2003 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: xpm.c 2 * File: xpm.c
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: xpm.C,v 1.3 2003/11/25 11:52:42 pcg Exp $ 4 * $Id: xpm.C,v 1.4 2003/12/18 02:07:12 pcg Exp $
5 * 5 *
6 * All portions of code are copyright by their respective author/s. 6 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1997 Carsten Haitzler <raster@zip.com.au> 7 * Copyright (c) 1997 Carsten Haitzler <raster@zip.com.au>
8 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> 8 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
9 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 9 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
62 62
63#define MAXLEN_GEOM sizeof("[1000x1000+1000+1000]") 63#define MAXLEN_GEOM sizeof("[1000x1000+1000+1000]")
64 64
65 if (geom == NULL) 65 if (geom == NULL)
66 return 0; 66 return 0;
67 str = rxvt_malloc(MAXLEN_GEOM + 1); 67 str = (char *)rxvt_malloc (MAXLEN_GEOM + 1);
68 if (!STRCMP(geom, "?")) { 68 if (!STRCMP(geom, "?")) {
69 sprintf(str, "[%dx%d+%d+%d]", /* can't presume snprintf() ! */ 69 sprintf(str, "[%dx%d+%d+%d]", /* can't presume snprintf() ! */
70 min(bgpixmap->w, 9999), min(bgpixmap->h, 9999), 70 min(bgpixmap->w, 9999), min(bgpixmap->h, 9999),
71 min(bgpixmap->x, 9999), min(bgpixmap->y, 9999)); 71 min(bgpixmap->x, 9999), min(bgpixmap->y, 9999));
72 rxvt_xterm_seq(aR_ XTerm_title, str, CHAR_ST); 72 rxvt_xterm_seq(aR_ XTerm_title, str, CHAR_ST);
282 282
283 cxy = (widthheight - cwh); 283 cxy = (widthheight - cwh);
284 if (pos <= 0) 284 if (pos <= 0)
285 cxy = 0; 285 cxy = 0;
286 else if (pos < cxy) 286 else if (pos < cxy)
287 cxy = pos; 287 cxy = (int) pos;
288 cwh += cxy; 288 cwh += cxy;
289 } else { /* expand */ 289 } else { /* expand */
290 if (cxy > 0) { /* position */ 290 if (cxy > 0) { /* position */
291 float pos; 291 float pos;
292 292

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines