ports/75924: [ maintainer ] x11-clocks/osdclock: update patch to make possible setting up a horizontal offset

Roman Bogorodskiy bogorodskiy at inbox.ru
Fri Jan 7 17:50:29 UTC 2005


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 07 17:50:27 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list