#!/usr/bin/ruby
# nessie_check.rb
=begin
- This file is part of the AVR-Crypto-Lib.
+ This file is part of the ARM-Crypto-Lib.
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
This program is free software: you can redistribute it and/or modify
=end
def skip_header(file)
+ i=0
begin
+ i += 1
l = file.gets().strip
- end until /[*]{10,}.*/.match(l)
- begin
- l = file.gets().strip
- end until /[*]{10,}.*/.match(l)
+ end until i>10 or m=/[*]{10,}.*/.match(l)
+ if(!m)
+ file.seek(0, IO::SEEK_SET)
+ else
+ begin
+ l = file.gets().strip
+ end until /[*]{10,}.*/.match(l)
+ end
begin
l = file.gets().strip
end until /[=]{5,}.*/.match(l)