Changeset 551 in ProjectBuilder for projects/buffer/pbconf
- Timestamp:
- Sep 20, 2008, 2:21:10 AM (17 years ago)
- Location:
- projects/buffer/pbconf/1.19
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/buffer/pbconf/1.19/buffer.pb
r501 r551 17 17 #pburl buffer = dir:///src/buffer-devel 18 18 # 19 #pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz20 pburl buffer = file:///home/bruno/Work/bruno/mandriva/buffer/SOURCES/buffer-1.19.tar.bz219 pburl buffer = http://hello-penguin.com/software/buffer/buffer-1.19.tar.gz 20 #pburl buffer = file:///home/bruno/Work/bruno/mandriva/buffer/SOURCES/buffer-1.19.tar.bz2 21 21 22 22 # Repository -
projects/buffer/pbconf/1.19/buffer/pbpatch/01-debian-patches.all
r501 r551 1 --- buffer-1.19.orig/buffer.man 2 +++ buffer-1.19/buffer.man 3 @@ -37,7 +37,8 @@ 4 Use the given file as the output file. The default is stdout. 5 .TP 6 .B \-S size 7 -After every chunk this size has been writen print out how much been writen so far. 8 +After every chunk of this size has been written, print out how much has 9 +been written so far. Also prints the total througput. 10 By default this is not set. 11 .TP 12 .B \-s size 13 @@ -71,9 +72,9 @@ 14 throughput on some drives.) 15 .TP 16 .B \-B 17 -Force each block writen to be padded out to the blocksize. This is needed by some tape 18 +Force each block written to be padded out to the blocksize. This is needed by some tape 19 and cartridge drives. Defaults to unpadded. This only affects the 20 -last block writen. 21 +last block written. 22 .TP 23 .B \-t 24 On exiting print to stderr a brief message showing the total number of 25 @@ -82,7 +83,7 @@ 26 .B \-Z 27 If reading/writing directly to a character device (like a tape drive) 28 then after each gigabyte perform an lseek to the start of the file. 29 -Use this flag with extreme care. If can only be used on devices where 30 +Use this flag with extreme care. It can only be used on devices where 31 an lseek does not rewind the tape but does reset the kernels position 32 flags. It is used to allow more than 2 gigabytes to be written. 33 .PP 34 --- buffer-1.19.orig/buffer.c 35 +++ buffer-1.19/buffer.c 36 @@ -78,7 +78,7 @@ 1 diff -urNp buffer-1.19.orig/buffer.c buffer-1.19/buffer.c 2 --- buffer-1.19.orig/buffer.c 2000-01-04 03:46:11.000000000 +0100 3 +++ buffer-1.19/buffer.c 2008-09-20 01:19:18.000000000 +0200 4 @@ -81,7 +81,7 @@ 37 5 * Christoph Wicki <wicki@iis.ethz.ch> 38 6 * … … 43 11 * Revision 1.6 1992/04/07 19:57:30 lmjm 44 12 * Added Kevins -B and -p options. 45 @@ -9 3,7 +93,7 @@13 @@ -96,7 +96,7 @@ 46 14 * Make sofar printing size an option. 47 15 * … … 52 20 * Now tries to fill this with blocks. 53 21 * reader waits for writer to terminate and then frees the shared mem and sems. 54 @@ -1 09,6 +109,9 @@22 @@ -112,6 +112,9 @@ 55 23 * Initial revision 56 24 * … … 62 30 #include <stdio.h> 63 31 #include <signal.h> 64 @@ -12 0,15 +123,16 @@32 @@ -123,15 +126,16 @@ 65 33 #include <sys/shm.h> 66 34 #include <sys/sem.h> … … 70 38 71 39 #ifndef lint 72 static char *rcsid = "$Header: / a/swan/home/swan/staff/csg/lmjm/src/buffer/RCS/buffer.c,v 1.19 1995/08/24 17:46:28 lmjm Exp lmjm$";40 static char *rcsid = "$Header: /usr/src/build/buffer/buffer.c,v 1.1 2000/01/04 02:45:48 root Exp $"; 73 41 #endif 74 42 … … 81 49 /* General macros */ 82 50 #define TRUE 1 83 @@ -13 6,6 +140,14 @@51 @@ -139,6 +143,14 @@ extern char *shmat(); 84 52 #define K *1024 85 53 #define M *1024*1024 … … 96 64 void byee(); 97 65 void start_reader_and_writer(); 98 @@ -1 59,7 +171,7 @@66 @@ -162,7 +174,7 @@ void write_block_to_stdout(); 99 67 void pr_out(); 100 68 void end_writer(); … … 105 73 #define PRINT_EVERY 10 K 106 74 107 @@ -25 0,7 +262,9 @@75 @@ -253,7 +265,9 @@ char *progname = "buffer"; 108 76 109 77 char print_total = 0; … … 116 84 int 117 85 main( argc, argv ) 118 @@ -26 2,6 +276,8 @@86 @@ -265,6 +279,8 @@ main( argc, argv ) 119 87 set_handlers(); 120 88 … … 125 93 start_reader_and_writer(); 126 94 127 @@ -2 87,7 +303,7 @@95 @@ -290,7 +306,7 @@ parse_args( argc, argv ) 128 96 129 97 while( (c = getopt( argc, argv, "BS:Zdm:s:b:p:u:ti:o:z:" )) != -1 ){ … … 134 102 break; 135 103 case 'u': /* pause after write for given microseconds */ 136 @@ -38 4,8 +400,8 @@104 @@ -387,8 +403,8 @@ parse_args( argc, argv ) 137 105 fprintf( stderr, "Usage: %s [-B] [-t] [-S size] [-m memsize] [-b blocks] [-p percent] [-s blocksize] [-u pause] [-i infile] [-o outfile] [-z size]\n", 138 106 progname ); … … 145 113 fprintf( stderr, "-b num = number of blocks in queue\n" ); 146 114 fprintf( stderr, "-p percent = don't start writing until percent blocks filled\n" ); 147 @@ - 397,6 +413,11 @@115 @@ -400,6 +416,11 @@ parse_args( argc, argv ) 148 116 byee( -1 ); 149 117 } … … 157 125 if (zflag) showevery = blocksize; 158 126 159 @@ -5 07,9 +528,9 @@127 @@ -510,9 +531,9 @@ buffer_allocate() 160 128 get_buffer(); 161 129 … … 169 137 #ifdef SYS5 170 138 memset( (char *)pbuffer, '\0', buffer_size ); 171 @@ -5 28,7 +549,17 @@139 @@ -531,7 +552,17 @@ buffer_allocate() 172 140 pbuffer->blocks_free_lock = 1; 173 141 /* start this off so lock() can be called on it for each block … … 187 155 /* Detattach the shared memory so the fork doesnt do anything odd */ 188 156 shmdt( (char *)pbuffer ); 189 @@ -6 48,7 +679,7 @@157 @@ -651,7 +682,7 @@ get_next_free_block() 190 158 int 191 159 fill_block() … … 196 164 int toread; 197 165 static char eof_reached = 0; 198 @@ -7 07,7 +738,7 @@166 @@ -710,7 +741,7 @@ writer() 199 167 { 200 168 int filled = 0; … … 205 173 if( debug ) 206 174 fprintf( stderr, "\tW: Entering writer\n blocks = %d\n maxfilled = %d\n", 207 @@ -74 2,7 +773,7 @@175 @@ -745,7 +776,7 @@ writer() 208 176 } 209 177 … … 214 182 215 183 if( debug ) 216 @@ -78 3,14 +814,14 @@184 @@ -786,14 +817,14 @@ write_blocks_to_stdout( filled, first_bl 217 185 void 218 186 write_block_to_stdout() … … 232 200 next_k = showevery; 233 201 } 234 @@ - 798,7 +829,7 @@202 @@ -801,7 +832,7 @@ write_block_to_stdout() 235 203 if( (written = write( fdout, curr_block->data, curr_block->bytes )) != curr_block->bytes ){ 236 204 report_proc(); … … 241 209 } 242 210 243 @@ -82 5,7 +856,7 @@211 @@ -828,7 +859,7 @@ write_block_to_stdout() 244 212 } 245 213 if( showevery ){ … … 250 218 if( outk >= next_k ){ 251 219 pr_out(); 252 @@ -91 4,13 +945,12 @@220 @@ -917,13 +948,12 @@ int 253 221 do_size( arg ) 254 222 char *arg; … … 268 236 case 'M': 269 237 ret = ret K K; 270 @@ -94 1,7 +971,36 @@238 @@ -944,7 +974,36 @@ do_size( arg ) 271 239 void 272 240 pr_out() … … 306 274 307 275 #ifdef SYS5 308 --- buffer-1.19.orig/sem.c 309 +++ buffer-1.19/sem.c 310 @@ -27,6 +27,7 @@ 311 * semaphores */ 312 313 #include <stdio.h> 314 +#include <unistd.h> 315 #include <sys/types.h> 316 #include <sys/stat.h> 317 #include <sys/ipc.h> 318 @@ -34,6 +35,20 @@ 319 #include <errno.h> 320 #include "sem.h" 321 322 +/* If we've got a version of glibc that doesn't define union semun, we do 323 + * it ourseleves like in semctl(2). Otherwise, fall back to the original 324 + * buffer behaviour of defining it (differetly!) only on some systems. 325 + * 326 + * mbuck@debian.org, 1999/08/29 327 + */ 328 +#if defined(__GNU_LIBRARY__) && defined(_SEM_SEMUN_UNDEFINED) 329 +union semun { 330 + int val; /* value for SETVAL */ 331 + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ 332 + unsigned short int *array; /* array for GETALL & SETALL */ 333 + struct seminfo *__buf; /* buffer for IPC_INFO */ 334 +}; 335 +#else 336 #if defined(SYS5) || defined(ultrix) || defined(_AIX) 337 union semun { 338 int val; 339 @@ -41,6 +56,7 @@ 340 ushort *array; 341 }; 342 #endif 343 +#endif 344 345 /* IMPORTS */ 346 347 @@ -95,7 +111,7 @@ 348 return sem; 349 } 350 351 -static 352 +static void 353 do_sem( sem_id, pbuf, err ) 354 int sem_id; 355 struct sembuf *pbuf; 356 @@ -149,10 +165,13 @@ 357 remove_sems( sem_id ) 358 int sem_id; 359 { 360 + union semun arg; 361 + 362 if( sem_id == -1 ) 363 return; 364 365 - if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){ 366 + arg.val = 0; 367 + if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){ 368 report_proc(); 369 perror( "internal error, failed to remove semaphore" ); 370 } 371 --- buffer-1.19.orig/debian/changelog 372 +++ buffer-1.19/debian/changelog 276 diff -urNp buffer-1.19.orig/buffer.man buffer-1.19/buffer.man 277 --- buffer-1.19.orig/buffer.man 2000-01-04 03:44:32.000000000 +0100 278 +++ buffer-1.19/buffer.man 2008-09-20 01:18:48.000000000 +0200 279 @@ -37,7 +37,8 @@ Use the given file as the input file. T 280 Use the given file as the output file. The default is stdout. 281 .TP 282 .B \-S size 283 -After every chunk this size has been writen print out how much been writen so far. 284 +After every chunk of this size has been written, print out how much has 285 +been written so far. Also prints the total througput. 286 By default this is not set. 287 .TP 288 .B \-s size 289 @@ -71,9 +72,9 @@ After every write pause for this many mi 290 throughput on some drives.) 291 .TP 292 .B \-B 293 -Force each block writen to be padded out to the blocksize. This is needed by some tape 294 +Force each block written to be padded out to the blocksize. This is needed by some tape 295 and cartridge drives. Defaults to unpadded. This only affects the 296 -last block writen. 297 +last block written. 298 .TP 299 .B \-t 300 On exiting print to stderr a brief message showing the total number of 301 @@ -82,7 +83,7 @@ bytes written. 302 .B \-Z 303 If reading/writing directly to a character device (like a tape drive) 304 then after each gigabyte perform an lseek to the start of the file. 305 -Use this flag with extreme care. If can only be used on devices where 306 +Use this flag with extreme care. It can only be used on devices where 307 an lseek does not rewind the tape but does reset the kernels position 308 flags. It is used to allow more than 2 gigabytes to be written. 309 .PP 310 diff -urNp buffer-1.19.orig/debian/changelog buffer-1.19/debian/changelog 311 --- buffer-1.19.orig/debian/changelog 1970-01-01 01:00:00.000000000 +0100 312 +++ buffer-1.19/debian/changelog 2008-09-20 01:18:48.000000000 +0200 373 313 @@ -0,0 +1,98 @@ 374 314 +buffer (1.19-7) unstable; urgency=low … … 470 410 +mode: debian-changelog 471 411 +End: 472 --- buffer-1.19.orig/debian/control 473 +++ buffer-1.19/debian/control 412 diff -urNp buffer-1.19.orig/debian/control buffer-1.19/debian/control 413 --- buffer-1.19.orig/debian/control 1970-01-01 01:00:00.000000000 +0100 414 +++ buffer-1.19/debian/control 2008-09-20 01:18:48.000000000 +0200 474 415 @@ -0,0 +1,19 @@ 475 416 +Source: buffer … … 492 433 + program and the tape device, but there are also other applications like 493 434 + buffering printer data in lpd's input filter. 494 --- buffer-1.19.orig/debian/rules 495 +++ buffer-1.19/debian/rules 435 diff -urNp buffer-1.19.orig/debian/copyright buffer-1.19/debian/copyright 436 --- buffer-1.19.orig/debian/copyright 1970-01-01 01:00:00.000000000 +0100 437 +++ buffer-1.19/debian/copyright 2008-09-20 01:18:48.000000000 +0200 438 @@ -0,0 +1,11 @@ 439 +This package was debianized by Martin Buck mbuck@debian.org on 440 +Wed, 27 Aug 1997 01:11:29 +0200. 441 + 442 +It was downloaded from 443 +http://sunsite.org.uk/public/public/packages/buffer/ 444 + 445 +Copyright: 446 +GPL (see /usr/share/common-licenses/GPL) 447 +In addtion under NO circumstances can I (Lee McLoughlin), or Imperial 448 +College, be held liable for any event caused by the running or storing of 449 +this program or its documentation. 450 diff -urNp buffer-1.19.orig/debian/rules buffer-1.19/debian/rules 451 --- buffer-1.19.orig/debian/rules 1970-01-01 01:00:00.000000000 +0100 452 +++ buffer-1.19/debian/rules 2008-09-20 01:18:48.000000000 +0200 496 453 @@ -0,0 +1,64 @@ 497 454 +#!/usr/bin/make -f … … 559 516 +binary: binary-indep binary-arch 560 517 +.PHONY: build clean binary-indep binary-arch binary install 561 --- buffer-1.19.orig/debian/copyright 562 +++ buffer-1.19/debian/copyright 563 @@ -0,0 +1,11 @@ 564 +This package was debianized by Martin Buck mbuck@debian.org on 565 +Wed, 27 Aug 1997 01:11:29 +0200. 566 + 567 +It was downloaded from 568 +http://sunsite.org.uk/public/public/packages/buffer/ 569 + 570 +Copyright: 571 +GPL (see /usr/share/common-licenses/GPL) 572 +In addtion under NO circumstances can I (Lee McLoughlin), or Imperial 573 +College, be held liable for any event caused by the running or storing of 574 +this program or its documentation. 518 diff -urNp buffer-1.19.orig/sem.c buffer-1.19/sem.c 519 --- buffer-1.19.orig/sem.c 2000-01-04 03:49:12.000000000 +0100 520 +++ buffer-1.19/sem.c 2008-09-20 01:18:48.000000000 +0200 521 @@ -27,6 +27,7 @@ 522 * semaphores */ 523 524 #include <stdio.h> 525 +#include <unistd.h> 526 #include <sys/types.h> 527 #include <sys/stat.h> 528 #include <sys/ipc.h> 529 @@ -103,7 +119,7 @@ new_sems( nsems ) 530 return sem; 531 } 532 533 -static 534 +static void 535 do_sem( sem_id, pbuf, err ) 536 int sem_id; 537 struct sembuf *pbuf; 538 @@ -157,10 +173,13 @@ void 539 remove_sems( sem_id ) 540 int sem_id; 541 { 542 + union semun arg; 543 + 544 if( sem_id == -1 ) 545 return; 546 547 - if( semctl( sem_id, 0, IPC_RMID, NULL ) == -1 ){ 548 + arg.val = 0; 549 + if( semctl( sem_id, 0, IPC_RMID, arg ) == -1 ){ 550 report_proc(); 551 perror( "internal error, failed to remove semaphore" ); 552 } -
projects/buffer/pbconf/1.19/buffer/rpm/buffer.spec
r501 r551 3 3 # 4 4 5 Summary: bufferspeeds up writing tapes on remote tape drives6 Summary(fr): bufferaccélère l'écriture des bande sur des périphériques distants5 Summary: This program speeds up writing tapes on remote tape drives 6 Summary(fr): Ce programme accélère l'écriture des bande sur des périphériques distants 7 7 8 8 Name: PBPKG … … 31 31 %install 32 32 %{__rm} -rf $RPM_BUILD_ROOT 33 install - m 755 -D buffer $RPM_BUILD_ROOT%{_bindir}/buffer34 install - m 644 -D buffer.man $RPM_BUILD_ROOT%{_mandir}/man1/buffer.133 install -p -m 755 -D buffer $RPM_BUILD_ROOT%{_bindir}/buffer 34 install -p -m 644 -D buffer.man $RPM_BUILD_ROOT%{_mandir}/man1/buffer.1 35 35 36 36 %clean … … 38 38 39 39 %files 40 %defattr(-,root,root) 41 %doc ChangeLog 40 %defattr(-,root,root,-) 42 41 %doc COPYING README 43 42 #AUTHORS NEWS -
projects/buffer/pbconf/1.19/pbfilter/all.pbf
r501 r551 18 18 19 19 # PBLOG is replaced by the changelog if value is yes 20 filter PBLOG = yes20 filter PBLOG = no 21 21 22 22 # License … … 42 42 43 43 # PBDESC contains the description of the package 44 filter PBDESC = This is a program designed to speed up writing tapes on remote tape drives. When this program is put "in the pipe", two processes are started. One process reads from standard-in and the other writes to standard-out.Both processes communicate via shared memory.44 filter PBDESC = This is a program designed to speed up writing tapes on remote tape drives.$/When this program is put "in the pipe", two processes are started.$/One process reads from standard-in and the other writes to standard-out.$/Both processes communicate via shared memory. 45 45 46 46 # PBURL contains the URL of the Web site of the project
Note:
See TracChangeset
for help on using the changeset viewer.