/* -*- c++ -*- */
/*
- * Copyright 2005,2007 Free Software Foundation, Inc.
+ * Copyright 2005,2007,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
#endif
#include <gr_skiphead.h>
#include <gr_io_signature.h>
+#include <string.h>
-gr_skiphead::gr_skiphead (size_t itemsize, size_t nitems_to_skip)
+gr_skiphead::gr_skiphead (size_t itemsize, uint64_t nitems_to_skip)
: gr_block ("skiphead",
gr_make_io_signature(1, 1, itemsize),
gr_make_io_signature(1, 1, itemsize)),
}
gr_skiphead_sptr
-gr_make_skiphead (size_t itemsize, size_t nitems_to_skip)
+gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip)
{
- return gr_skiphead_sptr (new gr_skiphead (itemsize, nitems_to_skip));
+ return gnuradio::get_initial_sptr(new gr_skiphead (itemsize, nitems_to_skip));
}
int
while (ii < ninput_items){
- long long ni_total = ii + d_nitems; // total items processed so far
+ uint64_t ni_total = ii + d_nitems; // total items processed so far
if (ni_total < d_nitems_to_skip){ // need to skip some more
int n_to_skip = (int) std::min(d_nitems_to_skip - ni_total,
- (long long)(ninput_items - ii));
+ (uint64_t)(ninput_items - ii));
ii += n_to_skip;
}