From owner-svn-ports-head@freebsd.org Thu May 10 14:26:08 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B372FCB1A1; Thu, 10 May 2018 14:26:08 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF4098A2F9; Thu, 10 May 2018 14:26:07 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1482219A7; Thu, 10 May 2018 14:26:07 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4AEQ700020934; Thu, 10 May 2018 14:26:07 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4AEQ7rw020931; Thu, 10 May 2018 14:26:07 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201805101426.w4AEQ7rw020931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Thu, 10 May 2018 14:26:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469549 - in head/sysutils/ods2: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/sysutils/ods2: . files X-SVN-Commit-Revision: 469549 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 14:26:08 -0000 Author: tobik Date: Thu May 10 14:26:06 2018 New Revision: 469549 URL: https://svnweb.freebsd.org/changeset/ports/469549 Log: sysutils/ods2: New maintainer - Assign to submitter - Fix some issues with - trailing spaces and/or tabs (for example: if you enter a COMMAND and then enter a few spaces or tabs, then you will get an error) - parsing command line - some compiler warnings - While here simplify DOCS installation PR: 228100 Submitted by: Oleg P. Added: head/sysutils/ods2/files/patch-direct.c (contents, props changed) Modified: head/sysutils/ods2/Makefile head/sysutils/ods2/files/patch-ods2.c Modified: head/sysutils/ods2/Makefile ============================================================================== --- head/sysutils/ods2/Makefile Thu May 10 14:24:33 2018 (r469548) +++ head/sysutils/ods2/Makefile Thu May 10 14:26:06 2018 (r469549) @@ -3,11 +3,12 @@ PORTNAME= ods2 PORTVERSION= 1.3 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.lugs.ch/~dussuett/ DISTNAME= ods2 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= pzn.unixbsd@gmail.com COMMENT= Utility for manipulating ODS-2 filesystems USES= zip @@ -29,6 +30,6 @@ do-install: do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include Added: head/sysutils/ods2/files/patch-direct.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ods2/files/patch-direct.c Thu May 10 14:26:06 2018 (r469549) @@ -0,0 +1,24 @@ +--- direct.c.orig 2001-08-31 18:01:07 UTC ++++ direct.c +@@ -136,12 +136,15 @@ int name_match(char *spec,int spec_len,char *dirent,in + register char sch = *name; + if (sch != '*') { + register char ech = *entry; +- if (sch != ech) if (toupper(sch) != toupper(ech)) +- if (sch == '%') { +- percent = MAT_NE; +- } else { +- break; +- } ++ if (sch != ech) { ++ if (toupper(sch) != toupper(ech)) { ++ if (sch == '%') { ++ percent = MAT_NE; ++ } else { ++ break; ++ } ++ } ++ } + } else { + break; + } Modified: head/sysutils/ods2/files/patch-ods2.c ============================================================================== --- head/sysutils/ods2/files/patch-ods2.c Thu May 10 14:24:33 2018 (r469548) +++ head/sysutils/ods2/files/patch-ods2.c Thu May 10 14:26:06 2018 (r469549) @@ -1,8 +1,55 @@ --- ods2.c.orig 2001-09-07 21:17:04 UTC +++ ods2.c -@@ -1094,8 +1094,10 @@ int main(int argc,char *argv[]) +@@ -1076,10 +1076,17 @@ char *getcmd(char *inp, char *prompt) + int main(int argc,char *argv[]) + { + char str[2048]; ++ char *ptr; ++ int iargc, i, ilen, len; ++ int cmdline = 0; + FILE *atfile = NULL; ++ + printf(" ODS2 %s\n", MODULE_IDENT); ++ if (argc>1) { /* if exist argument in the command line TRUE */ ++ cmdline = 1; ++ iargc = argc - 1; ++ } + while (1) { +- char *ptr; + if (atfile != NULL) { + if (fgets(str,sizeof(str),atfile) == NULL) { + fclose(atfile); +@@ -1090,18 +1097,50 @@ int main(int argc,char *argv[]) + if (ptr != NULL) *ptr = '\0'; + printf("$> %s\n",str); + } ++ } ++ else if (cmdline) { ++ ptr = str; ++ for ( len=0, ilen=0, i=argc-iargc; i %s\n",str); + } else { #ifdef VMS - if (getcmd (str, "$> ") == NULL) break; +- if (getcmd (str, "$> ") == NULL) break; ++ if (getcmd (str, "$> ") == NULL) break; #else - printf("$> "); - if (gets(str) == NULL) break; @@ -11,5 +58,34 @@ + break; + str[strlen(str)-1] = '\0'; /* strip newline from str */ #endif - } +- } ++ } /* if - else if - else */ ptr = str; +- while (*ptr == ' ' || *ptr == '\t') ptr++; +- if (strlen(ptr) && *ptr != '!') { ++ while (*ptr == ' ' || *ptr == '\t') ptr++; /* space and tab */ ++ len = strlen(ptr); ++ if (len && *ptr != '!') { + if (*ptr == '@') { ++ len--; ++ /* remove trailing spaces and tabs */ ++ while (*(ptr+len) == ' ' || *(ptr+len) == '\t') { ++ *(ptr+len) = '\0'; ++ len--; ++ } + if (atfile != NULL) { + printf("%%ODS2-W-INDIRECT, indirect indirection not permitted\n"); + } else { +@@ -1112,9 +1151,9 @@ int main(int argc,char *argv[]) + } + } else { + if ((cmdsplit(ptr) & 1) == 0) break; +- } +- } +- } ++ } /* else */ ++ } /* if */ ++ } /* while (1) */ + if (atfile != NULL) fclose(atfile); + return 1; + }