source: MondoRescue/branches/2.2.9/mindi-busybox/archival/libunarchive/data_align.c@ 3320

Last change on this file since 3320 was 3320, checked in by Bruno Cornec, 9 years ago
  • Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in the move to 3.0
  • Property svn:eol-style set to native
File size: 457 bytes
Line 
1/* vi: set sw=4 ts=4: */
2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
4 */
5
6//#include <sys/types.h>
7
8#include "libbb.h"
9#include "unarchive.h"
10
11void data_align(archive_handle_t *archive_handle, const unsigned short boundary)
12{
13 const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary;
14
15 archive_handle->seek(archive_handle, skip_amount);
16 archive_handle->offset += skip_amount;
17}
Note: See TracBrowser for help on using the repository browser.