[xiph-cvs] cvs commit: ogg-tools/oggsplit/debian changelog control copyright

Philip Jägenstedt foolip at xiph.org
Sun Nov 30 15:56:04 PST 2003



foolip      03/11/30 18:56:04

  Modified:    oggsplit AUTHORS ChangeLog README configure.in oggsplit.1
                        oggsplit.c output.c output.h
               oggsplit/debian changelog control copyright
  Log:
  Commited a patch from Jeroen Demeyer to support a --dry-run option.

Revision  Changes    Path
1.3       +1 -1      ogg-tools/oggsplit/AUTHORS

Index: AUTHORS
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/AUTHORS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AUTHORS	8 Aug 2003 17:50:55 -0000	1.2
+++ AUTHORS	30 Nov 2003 23:56:03 -0000	1.3
@@ -1 +1 @@
-Philip Jägenstedt <philipj at telia.com>
+Philip Jägenstedt <philip at lysator.liu.se>

<p><p>1.4       +5 -0      ogg-tools/oggsplit/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ChangeLog	11 Aug 2003 18:11:35 -0000	1.3
+++ ChangeLog	30 Nov 2003 23:56:03 -0000	1.4
@@ -1,5 +1,10 @@
 -*- text -*-
 
+oggsplit (0.1.2)  Jeroen Demeyer <jdemeyer at cage.ugent.be>
+  * added --dry-run option.
+  * changed 2nd argument of output_ctrl_init() to const char* to prevent
+    compiler warning.
+
 oggsplit (0.1.1)
   * moved all output filename calculation to one place and tidied it up.
   * changed how the output filenames are calculated. Now any suffix of

<p><p>1.3       +1 -1      ogg-tools/oggsplit/README

Index: README
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README	8 Aug 2003 17:50:55 -0000	1.2
+++ README	30 Nov 2003 23:56:03 -0000	1.3
@@ -13,4 +13,4 @@
 
   Comments and bugfixes are welcome.
 
-    - Philip Jägenstedt <philipj at telia.com>
+    - Philip Jägenstedt <philip at lysator.liu.se>

<p><p>1.3       +1 -1      ogg-tools/oggsplit/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.in	7 Aug 2003 08:45:39 -0000	1.2
+++ configure.in	30 Nov 2003 23:56:03 -0000	1.3
@@ -2,7 +2,7 @@
 
 AC_INIT(oggsplit.c)
 dnl Every other copy of the package version number gets its value from here
-AM_INIT_AUTOMAKE(oggsplit, 0.1.0)
+AM_INIT_AUTOMAKE(oggsplit, 0.1.2)
 
 AC_SUBST(VERSION)
 

<p><p>1.4       +7 -2      ogg-tools/oggsplit/oggsplit.1

Index: oggsplit.1
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/oggsplit.1,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- oggsplit.1	11 Aug 2003 18:11:35 -0000	1.3
+++ oggsplit.1	30 Nov 2003 23:56:03 -0000	1.4
@@ -5,7 +5,7 @@
 .\" the Free Software Foundation; either version 2 of the License, or
 .\" (at your option) any later version.
 
-.TH oggsplit 1 "August 7, 2003"
+.TH oggsplit 1 "November 30, 2003"
 .\" Please update the above date whenever this man page is modified.
 
 .SH NAME
@@ -47,6 +47,11 @@
 Only split grouped streams. This  will cause only the first link to be
 processed, and the names of the output files will be slightly simpler.
 .TP
+.B \-n, \-\-dry-run
+Just print the streams that would be extracted, but do not extract them.
+This can be used to analyse the structure of an Ogg, without actually
+getting the files.
+.TP
 .BI "-o, --outdir " "<directory>"
 Create all output files in the specified directory. The default is to create
 all output files in the current directory.
@@ -58,4 +63,4 @@
 Show summary of options.
 
 .SH AUTHOR
-Philip Jägenstedt <philipj at telia.com>.
+Philip Jägenstedt <philip at lysator.liu.se>.

<p><p>1.5       +13 -5     ogg-tools/oggsplit/oggsplit.c

Index: oggsplit.c
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/oggsplit.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- oggsplit.c	11 Aug 2003 18:11:35 -0000	1.4
+++ oggsplit.c	30 Nov 2003 23:56:03 -0000	1.5
@@ -34,6 +34,7 @@
 
 int unchain=1;
 int ungroup=1;
+int dryrun=0;
 char *outdir=NULL;
 
 const char *broken_ogg = \
@@ -44,10 +45,11 @@
 "  files procuduces by this invocation of OggSplit may also be\n"
 "  invalid Ogg files.\n\n";
 
-const char *optstring="cgo:uVh";
+const char *optstring="cgno:uVh";
 struct option options [] = {
   {"unchain", no_argument,       NULL, 'c'},
   {"ungroup", no_argument,       NULL, 'g'},
+  {"dry-run", no_argument,       NULL, 'n'},
   {"outdir",  required_argument, NULL, 'o'},
   {"version", no_argument,       NULL, 'V'},
   {"help",    no_argument,       NULL, 'h'},
@@ -63,6 +65,8 @@
           "                    split both grouped and chained streams.\n"
           "  -g --ungroup   Only split grouped streams. This will cause only\n"
           "                    the first link to be processed.\n"
+	  "  -n --dry-run   Print the streams that would be extracted, but do\n"
+	  "                    not extract them.\n"
           "  -o --outdir <directory>\n"
           "                 Create all output files in the specified directory.\n"
           "  -V --version   Show OggSplit version.\n"
@@ -134,12 +138,12 @@
           /* new chain link, create new output */
           if(unchain)chain_c++;
           if(ungroup)group_c++;
-	  stream->op=output_ctrl_output_new(&oc, chain_c, group_c);
+	  stream->op=output_ctrl_output_new(&oc, chain_c, group_c, dryrun);
           chain_state=1;
           break;
         case 1:
           if(ungroup){
-	    stream->op=output_ctrl_output_new(&oc, chain_c, ++group_c);
+	    stream->op=output_ctrl_output_new(&oc, chain_c, ++group_c, dryrun);
           }else{
             /* use previously opened output */
             stream->op=oc.outputs[oc.outputs_used-1];
@@ -149,8 +153,9 @@
         }
 
         printf("Ogg logical stream (serial %08x): type %s\n"
-	       "  writing stream to `%s'\n\n",
+	       "  %s `%s'\n\n",
                stream->serial, stream_type_name(stream),
+	       dryrun ? "would write stream to" : "writing stream to",
                stream->op->filename);
 
       }else{
@@ -161,7 +166,7 @@
           /* there's junk in the file! */
           if(junk==NULL){
             /* call with 0, 0 to get the junk file */
-	    junk=output_ctrl_output_new(&oc, 0, 0);
+	    junk=output_ctrl_output_new(&oc, 0, 0, dryrun);
             fprintf(stderr,
                     "WARNING: An Ogg stream (serial %08x) with no header was encountered\n"
                     "  in `%s'.\n"
@@ -243,6 +248,9 @@
       if(outdir!=NULL)free(outdir);
       outdir=xstrdup(optarg);
       break;
+    case 'n':
+      dryrun=1;
+      break;
     case 'V':
       printf("OggSplit %s\n", VERSION);
       exit(0);

<p><p>1.5       +18 -12    ogg-tools/oggsplit/output.c

Index: output.c
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/output.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- output.c	11 Aug 2003 18:11:35 -0000	1.4
+++ output.c	30 Nov 2003 23:56:03 -0000	1.5
@@ -19,7 +19,7 @@
 /* outdir given on command line */
 extern char *outdir;
 
-int output_ctrl_init(output_ctrl_t *oc, char *pathname)
+int output_ctrl_init(output_ctrl_t *oc, const char *pathname)
 {
   int pathname_len, i;
   /* indexes in pathname where basname begs ends ends.*/
@@ -89,7 +89,7 @@
 {
   int i;
   for(i=0; i<oc->outputs_used; i++){
-    fclose(oc->outputs[i]->file);
+    if (oc->outputs[i]->file) fclose(oc->outputs[i]->file);
     free(oc->outputs[i]->filename);
     free(oc->outputs[i]);
   }
@@ -100,7 +100,7 @@
   return 1;
 }
 
-output_t *output_ctrl_output_new(output_ctrl_t *oc, int chain_c, int group_c)
+output_t *output_ctrl_output_new(output_ctrl_t *oc, int chain_c, int group_c, int dryrun)
 {
   output_t *op;
   int fnlen, fnret;
@@ -141,12 +141,16 @@
     break;
   }
 
-  op->file=fopen(op->filename, "w");
-  if(op->file==NULL){
-    fprintf(stderr, "Cannot open output file \"%s\": %s\n",
-	    op->filename, strerror(errno));
-    exit(1);
+  if (!dryrun){
+    op->file=fopen(op->filename, "w");
+    if(op->file==NULL){
+      fprintf(stderr, "Cannot open output file \"%s\": %s\n",
+	      op->filename, strerror(errno));
+      exit(1);
+    }
   }
+  else
+    op->file=NULL;
 
   op->id=oc->idcount++;
   op->count=1;
@@ -163,8 +167,8 @@
     if(oc->outputs[i]->id==id){
       oc->outputs[i]->count--;
       if(oc->outputs[i]->count==0){
-	fclose(oc->outputs[i]->file);
-	free(oc->outputs[i]->filename);
+        if (oc->outputs[i]->file) fclose(oc->outputs[i]->file);
+        free(oc->outputs[i]->filename);
 
         oc->outputs_used--;
 
@@ -182,8 +186,10 @@
 
 int output_page_write(output_t *op, ogg_page *og)
 {
-  if(fwrite(og->header, og->header_len, 1, op->file)==0)return 0;
-  if(fwrite(og->body, og->body_len, 1, op->file)==0)return 0;
+  if (op->file){
+    if(fwrite(og->header, og->header_len, 1, op->file)==0)return 0;
+    if(fwrite(og->body, og->body_len, 1, op->file)==0)return 0;
+  }
 
   return 1;
 }

<p><p>1.4       +2 -2      ogg-tools/oggsplit/output.h

Index: output.h
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/output.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- output.h	11 Aug 2003 18:11:35 -0000	1.3
+++ output.h	30 Nov 2003 23:56:03 -0000	1.4
@@ -34,9 +34,9 @@
 } output_ctrl_t;
 
 
-int       output_ctrl_init(output_ctrl_t *oc, char *pathname);
+int       output_ctrl_init(output_ctrl_t *oc, const char *pathname);
 int       output_ctrl_free(output_ctrl_t *oc);
-output_t *output_ctrl_output_new(output_ctrl_t *oc, int chain_c, int group_c);
+output_t *output_ctrl_output_new(output_ctrl_t *oc, int chain_c, int group_c, int dryrun);
 int       output_ctrl_output_free(output_ctrl_t *oc, int id);
 
 int       output_page_write(output_t *op, ogg_page *og);

<p><p>1.2       +6 -0      ogg-tools/oggsplit/debian/changelog

Index: changelog
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/debian/changelog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- changelog	6 Aug 2003 16:58:32 -0000	1.1
+++ changelog	30 Nov 2003 23:56:04 -0000	1.2
@@ -1,3 +1,9 @@
+oggsplit (0.1.2-1) unstable; urgency=low
+
+  * Upstream release.
+
+ -- Philip Jägenstedt <philip at lysator.liu.se>  Mon,  1 Dec 2003 00:45:48 +0100
+
 oggsplit (0.1.0-1) unstable; urgency=low
 
   * Initial Release.

<p><p>1.2       +1 -1      ogg-tools/oggsplit/debian/control

Index: control
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/debian/control,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- control	6 Aug 2003 16:58:32 -0000	1.1
+++ control	30 Nov 2003 23:56:04 -0000	1.2
@@ -1,7 +1,7 @@
 Source: oggsplit
 Section: misc
 Priority: optional
-Maintainer: Philip Jägenstedt <philipj at telia.com>
+Maintainer: Philip Jägenstedt <philip at lysator.liu.se>
 Build-Depends: debhelper (>> 4.0.0) libogg-dev (>> 1.0.0)
 Standards-Version: 3.5.8
 

<p><p>1.2       +2 -2      ogg-tools/oggsplit/debian/copyright

Index: copyright
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggsplit/debian/copyright,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- copyright	6 Aug 2003 16:58:32 -0000	1.1
+++ copyright	30 Nov 2003 23:56:04 -0000	1.2
@@ -1,7 +1,7 @@
-This package was debianized by Philip Jägenstedt <philipj at telia.com> on
+This package was debianized by Philip Jägenstedt <philip at lysator.liu.se> on
 Tue,  5 Aug 2003 02:02:40 +0200.
 
-Upstream Author(s): Philip Jägenstedt <philipj at telia.com>
+Upstream Author(s): Philip Jägenstedt <philip at lysator.liu.se>
 
 
 Copyright (C) 2003 Philip Jägenstedt

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list