~ubuntu-branches/ubuntu/wily/geany/wily

« back to all changes in this revision

Viewing changes to debian/patches/20_debian_control_tags.dpatch

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 20_debian_control_tags.dpatch by Damián Viano <des@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Add support for having 'Source:' and 'Package:' as tags in a 
6
 
## DP: RFC2822 file as debian/control
7
 
 
8
 
@DPATCH@
9
 
diff -urNad geany-0.17~/tagmanager/conf.c geany-0.17/tagmanager/conf.c
10
 
--- geany-0.17~/tagmanager/conf.c       2009-03-30 14:49:40.000000000 -0300
11
 
+++ geany-0.17/tagmanager/conf.c        2009-05-29 19:41:17.000000000 -0300
12
 
@@ -14,6 +14,7 @@
13
 
 #include "general.h"   /* must always come first */
14
 
 
15
 
 #include <ctype.h>
16
 
+#include <string.h>
17
 
 
18
 
 #include "parse.h"
19
 
 #include "read.h"
20
 
@@ -74,6 +75,20 @@
21
 
                        continue;
22
 
                }
23
 
 
24
 
+               /* look for a stanza */
25
 
+               if (*cp != '\0' && (strncmp((const char*) cp, "Source:", 7) == 0 ||
26
 
+                       strncmp((const char*) cp, "Package:", 8) == 0))
27
 
+               {
28
 
+                       cp = (const unsigned char*) strchr((const char*) cp, ':') + 1;
29
 
+                       while (isspace ((int) *cp))
30
 
+                               ++cp;
31
 
+                       vStringCopyS (name, (const char*) cp);
32
 
+                       vStringTerminate (name);
33
 
+                       makeSimpleTag (name, ConfKinds, K_SECTION);
34
 
+                       vStringClear (name);
35
 
+                       continue;
36
 
+               }
37
 
+
38
 
                while (*cp != '\0')
39
 
                {
40
 
                        /*  We look for any sequence of identifier characters following a white space */