From bogorodskiy@inbox.ru  Fri Jan  7 17:44:17 2005
Return-Path: <bogorodskiy@inbox.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 447FB16A4D0
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 17:44:16 +0000 (GMT)
Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1B79A43D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 17:44:16 +0000 (GMT)
	(envelope-from bogorodskiy@inbox.ru)
Received: from [217.23.66.42] (port=58452 helo=novel.zapto.org)
	by mx1.mail.ru with esmtp 
	id 1Cmy9l-000FOa-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 07 Jan 2005 20:44:14 +0300
Message-Id: <E1Cmy9l-000FOa-00.bogorodskiy-inbox-ru@mx1.mail.ru>
Date: Fri, 07 Jan 2005 20:44:14 +0300
From: Roman Bogorodskiy <bogorodskiy@inbox.ru>
Reply-To: Roman Bogorodskiy <bogorodskiy@inbox.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ maintainer ] x11-clocks/osdclock: update patch to make possible setting up a horizontal offset
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         75924
>Category:       ports
>Synopsis:       [ maintainer ] x11-clocks/osdclock: update patch to make possible setting up a horizontal offset
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 07 17:50:27 GMT 2005
>Closed-Date:    Sat Jan 08 10:59:05 GMT 2005
>Last-Modified:  Sat Jan 08 10:59:05 GMT 2005
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.3-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #3: Sat Dec 11 21:01:26 MSK 2004 root@lame.novel.ru:/usr/obj/usr/src/sys/MIRRORBOX i386


>Description:
	Add option "-H" - horizontal offset (e.g. osdclock -H 100). 

	Requested by Sergey Chumakov.
>How-To-Repeat:
>Fix:

--- port.osdclock.diff begins here ---
diff -ru osdclock.orig/Makefile osdclock/Makefile
--- osdclock.orig/Makefile	Fri Jan  7 20:31:21 2005
+++ osdclock/Makefile	Fri Jan  7 20:34:29 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	osdclock
 PORTVERSION=	0.5
+PORTREVISION=	1
 CATEGORIES=	x11-clocks
 MASTER_SITES=	http://leftorium.net/software/
 DISTNAME=	osd_clock-${PORTVERSION}
diff -ru osdclock.orig/files/patch-osd_clock.c osdclock/files/patch-osd_clock.c
--- osdclock.orig/files/patch-osd_clock.c	Fri Jan  7 20:31:21 2005
+++ osdclock/files/patch-osd_clock.c	Fri Jan  7 20:34:00 2005
@@ -1,6 +1,36 @@
---- osd_clock.c.orig	Thu Mar 29 19:10:24 2001
-+++ osd_clock.c	Fri Aug  6 08:05:45 2004
-@@ -109,7 +109,15 @@
+--- osd_clock.c.orig	Sun Apr  8 02:50:01 2001
++++ osd_clock.c	Tue Jan  4 16:27:20 2005
+@@ -57,8 +57,9 @@
+   int offset = 0;
+   int shadow = 2;
+   int interval = 1;
+-
+-  while ((c = getopt_long(argc ,argv,"f:c:d:F:i:s:o:tbh",
++  int horizontal_offset = 0;
++  
++  while ((c = getopt_long(argc ,argv,"f:c:d:F:i:s:o:tbH:h",
+ 			  long_options, NULL)) != -1)
+   {
+     switch(c)
+@@ -90,6 +91,9 @@
+       case 'b':
+ 	pos = XOSD_bottom;
+ 	break;
++      case 'H':
++	horizontal_offset = atoi(optarg);
++	break;
+       case 'h':
+ 	printf("USAGE: %s [-flag args]\n"
+ 		"\t-f\tfully qualified font.  default: fixed\n"
+@@ -102,6 +106,7 @@
+ 		"\t-d\tDelay (time the clock stays on screen when it's updated)\n"
+ 	        "\t\tin seconds\n"
+ 		"\t-i\tInterval (time between updates) in seconds\n"
++		"\t-H\thorizontal offset. default: 0\n"
+ 		"\t-h\tthis help message\n",
+ 		argv[0]);
+ 	return EXIT_SUCCESS;
+@@ -109,7 +114,16 @@
      }
    }
    
@@ -12,13 +42,14 @@
 +  xosd_set_timeout(osd, delay);
 +  xosd_set_pos(osd, pos);
 +  xosd_set_vertical_offset(osd, offset);
++  xosd_set_horizontal_offset(osd, horizontal_offset);
 +  xosd_set_shadow_offset(osd, shadow);
 +  
    if (!osd)
    {
      fprintf (stderr, "Error initializing osd\n");
-@@ -127,11 +135,12 @@
-     output = malloc(255 * sizeof(char));
+@@ -126,11 +140,12 @@
+    
      strftime(output, 255, format, localtime(&curr_time));
  
 -    xosd_display (osd, 1, XOSD_string, output);
--- port.osdclock.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: krion 
State-Changed-When: Sat Jan 8 10:58:59 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75924 
>Unformatted:
