remove completely flawed strncmp patches
This commit is contained in:
parent
e47238fb1e
commit
50da1cf963
@ -1,7 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2005/11/14 17:09:22 pvalchev Exp $
|
||||
|
||||
COMMENT= "picture viewer for X, with thumbnail-based file selector"
|
||||
DISTNAME= xzgv-0.8
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= graphics
|
||||
|
||||
HOMEPAGE= http://rus.members.beeb.net/xzgv.html
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_copymove_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
$OpenBSD: patch-src_copymove_c,v 1.2 2005/11/14 17:09:22 pvalchev Exp $
|
||||
--- src/copymove.c.orig Thu Nov 16 15:59:48 2000
|
||||
+++ src/copymove.c Thu May 12 15:31:52 2005
|
||||
@@ -57,15 +57,17 @@ if(!cm_isdir(dstdir)) return(0);
|
||||
@ -63,12 +63,3 @@ $OpenBSD: patch-src_copymove_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
|
||||
if(mainwin)
|
||||
{
|
||||
@@ -377,7 +382,7 @@ static void cb_ok_button(GtkWidget *butt
|
||||
char *ptr=gtk_entry_get_text(GTK_ENTRY(entry));
|
||||
int isdir;
|
||||
|
||||
-if(!ptr || *ptr==0 || strcmp(ptr,".")==0)
|
||||
+if(!ptr || *ptr==0 || strncmp(ptr,".",2)==0)
|
||||
{
|
||||
gtk_widget_destroy(dir_win);
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_install-info_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
$OpenBSD: patch-src_install-info_c,v 1.2 2005/11/14 17:09:22 pvalchev Exp $
|
||||
--- src/install-info.c.orig Thu May 12 15:09:12 2005
|
||||
+++ src/install-info.c Thu May 12 15:26:28 2005
|
||||
@@ -166,12 +166,12 @@ concat (s1, s2, s3)
|
||||
@ -19,21 +19,3 @@ $OpenBSD: patch-src_install-info_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -674,7 +674,7 @@ For more information about these matters
|
||||
basename_len = strlen (infile_basename);
|
||||
infile_sans_info
|
||||
= (strlen (infile_basename) > 5
|
||||
- && strcmp (infile_basename + basename_len - 5, ".info") == 0)
|
||||
+ && strncmp (infile_basename + basename_len - 5, ".info",6) == 0)
|
||||
? copy_string (infile_basename, basename_len - 5)
|
||||
: infile_basename;
|
||||
|
||||
@@ -880,7 +880,7 @@ For more information about these matters
|
||||
/* Mark the end of the Top node as the place to add any
|
||||
new sections that are needed. */
|
||||
for (node = dir_nodes; node; node = node->next)
|
||||
- if (node->name && strcmp (node->name, "Top") == 0)
|
||||
+ if (node->name && strncmp (node->name, "Top", 4) == 0)
|
||||
dir_lines[node->end_line].add_sections_before = 1;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_logoconv_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
$OpenBSD: patch-src_logoconv_c,v 1.2 2005/11/14 17:09:22 pvalchev Exp $
|
||||
--- src/logoconv.c.orig Sat Oct 7 15:25:25 2000
|
||||
+++ src/logoconv.c Thu May 12 15:35:40 2005
|
||||
@@ -10,6 +10,7 @@
|
||||
@ -9,12 +9,3 @@ $OpenBSD: patch-src_logoconv_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
|
||||
|
||||
/* we take an extremely generous outlook - anything other than a decimal
|
||||
@@ -49,7 +50,7 @@ unsigned char buf[128];
|
||||
int w,h,x,y,c;
|
||||
|
||||
fgets(buf,sizeof(buf),stdin);
|
||||
-if(strcmp(buf,"P6\n")!=0)
|
||||
+if(strncmp(buf,"P6\n",4)!=0)
|
||||
fprintf(stderr,"logoconv: stdin not a raw PPM file.\n"),exit(1);
|
||||
|
||||
w=read_next_number(stdin);
|
||||
|
@ -1,15 +1,6 @@
|
||||
$OpenBSD: patch-src_main_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
$OpenBSD: patch-src_main_c,v 1.2 2005/11/14 17:09:22 pvalchev Exp $
|
||||
--- src/main.c.orig Tue Sep 16 15:49:01 2003
|
||||
+++ src/main.c Thu May 12 15:36:47 2005
|
||||
@@ -2889,7 +2889,7 @@ if((in=fopen(filename,"rb"))==NULL)
|
||||
return(0);
|
||||
|
||||
fgets(buf,sizeof(buf),in);
|
||||
-if(strcmp(buf,"P7 332\n")!=0)
|
||||
+if(strncmp(buf,"P7 332\n",sizeof(buf))!=0)
|
||||
return(0);
|
||||
|
||||
/* we're not worried about any comments */
|
||||
@@ -3007,25 +3007,25 @@ if(l<=4) return(0);
|
||||
* natively, and uses ImageMagick's `convert' for others.
|
||||
* But we have our own GIF/PNG/mrf readers.
|
||||
@ -66,17 +57,6 @@ $OpenBSD: patch-src_main_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
|
||||
datptr=gtk_clist_get_row_data(GTK_CLIST(clist),*entryp);
|
||||
|
||||
@@ -3386,8 +3386,8 @@ while((dent=readdir(dirfile))!=NULL)
|
||||
continue; /* skip (most) 'dot' files */
|
||||
|
||||
/* no `.' ever, and no `..' if at root. */
|
||||
- if(strcmp(dent->d_name,".")==0 ||
|
||||
- (strcmp(cdir,"/")==0 && strcmp(dent->d_name,"..")==0))
|
||||
+ if(strncmp(dent->d_name,".",2)==0 ||
|
||||
+ (strncmp(cdir,"/",2)==0 && strncmp(dent->d_name,"..",3)==0))
|
||||
continue;
|
||||
|
||||
/* see if it's a dir */
|
||||
@@ -3433,10 +3433,10 @@ void set_title(int include_dir)
|
||||
{
|
||||
static char buf[1024];
|
||||
@ -168,12 +148,3 @@ $OpenBSD: patch-src_main_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
|
||||
|
||||
/* ok, now kludge it :-) - the black right/bottom edge turns to white,
|
||||
* which is too bright. Make that the same as the grey line above/left of it.
|
||||
@@ -4703,7 +4709,7 @@ if(read_dir)
|
||||
|
||||
/* check it's really `..' (won't be if in root dir) */
|
||||
gtk_clist_get_text(GTK_CLIST(clist),0,SELECTOR_NAME_COL,&ptr);
|
||||
- if(strcmp(ptr,"..")==0)
|
||||
+ if(strncmp(ptr,"..",3)==0)
|
||||
set_focus_row(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user