Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 13, 2024
1 parent 44c4a10 commit 4fc8d57
Show file tree
Hide file tree
Showing 103 changed files with 365 additions and 318 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Acknowledgements: libbfio

Copyright (C) 2009-2023, Joachim Metz <[email protected]>
Copyright (C) 2009-2024, Joachim Metz <[email protected]>

Additional credits go to:
- Xavier Roche, for providing the memory range patches
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ environment:
install:
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
git clone https://github.com/libyal/vstools.git ..\vstools )
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi
- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
- sh: if ( test `uname -s` = "Darwin" && test ${BUILD_ENVIRONMENT} = "python-tox" ) || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi
- ps: If ($env:BUILD_ENVIRONMENT -eq "cygwin64") {
(New-Object Net.WebClient).DownloadFile("https://cygwin.com/setup-x86_64.exe", "C:\\cygwin64\\setup-x86_64.exe") }
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
Expand All @@ -129,7 +129,7 @@ install:
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe }

build_script:
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) {
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python-tox" -and $isWindows)) {
.\synclibs.ps1;
.\autogen.ps1 }
- ps: If ($env:TARGET -eq "vs2008") {
Expand Down
66 changes: 37 additions & 29 deletions autogen.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Script to generate the necessary files for a msvscpp build
#
# Version: 20230104
# Version: 20240306

$WinFlex = "..\win_flex_bison\win_flex.exe"
$WinBison = "..\win_flex_bison\win_bison.exe"
Expand All @@ -9,48 +9,56 @@ $Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Re
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
$Prefix = ${Library}.Substring(3)

Get-Content -Path "include\${Library}.h.in" > "include\${Library}.h"
Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } > "include\${Library}\definitions.h"
Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\features.h"
Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } > "include\${Library}\types.h"
Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } > "common\types.h"
Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}_definitions.h"
Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Library}\${Library}.rc"
Get-Content -Path "include\${Library}.h.in" | Out-File -Encoding ascii "include\${Library}.h"
Get-Content -Path "include\${Library}\definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "include\${Library}\definitions.h"
Get-Content -Path "include\${Library}\features.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\features.h"
Get-Content -Path "include\${Library}\types.h.in" | % { $_ -Replace "@[A-Z0-9_]*@","0" } | Out-File -Encoding ascii "include\${Library}\types.h"
Get-Content -Path "common\types.h.in" | % { $_ -Replace "@PACKAGE@","${Library}" } | Out-File -Encoding ascii "common\types.h"
Get-Content -Path "${Library}\${Library}_definitions.h.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}_definitions.h"
Get-Content -Path "${Library}\${Library}.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Library}\${Library}.rc"

If (Test-Path "setup.cfg.in")
{
Get-Content -Path "setup.cfg.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "setup.cfg"
}

If (Test-Path "${Prefix}.net")
{
Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } > "${Prefix}.net\${Prefix}.net.rc"
Get-Content -Path "${Prefix}.net\${Prefix}.net.rc.in" | % { $_ -Replace "@VERSION@","${Version}" } | Out-File -Encoding ascii "${Prefix}.net\${Prefix}.net.rc"
}

$NamePrefix = ""

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
ForEach (${Library} in Get-ChildItem -Directory -Path "lib*")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.l")
{
$OutputFile = ${DirectoryElement} -Replace ".l$",".c"

$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"
$NamePrefix = Split-Path -path ${DirectoryElement} -leaf
$NamePrefix = ${NamePrefix} -Replace ".l$","_"

Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"
Write-Host "Running: ${WinFlex} -Cf ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_flex writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinFlex}' -Cf ${DirectoryElement} 2>&1"
Write-Host ${Output}

# Moving manually since win_flex -o <filename> does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}
# Moving manually since `win_flex -o filename' does not provide the expected behavior.
Move-Item "lex.yy.c" ${OutputFile} -force
}

ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"
ForEach (${DirectoryElement} in Get-ChildItem -Path "${Library}\*.y")
{
$OutputFile = ${DirectoryElement} -Replace ".y$",".c"

Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"
Write-Host "Running: ${WinBison} -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement}"

# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
# PowerShell will raise NativeCommandError if win_bison writes to stdout or stderr
# therefore 2>&1 is added and the output is stored in a variable.
$Output = Invoke-Expression -Command "& '${WinBison}' -d -v -l -p ${NamePrefix} -o ${OutputFile} ${DirectoryElement} 2>&1"
Write-Host ${Output}
}
}

2 changes: 1 addition & 1 deletion common/byte_stream.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Byte stream functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Common include file
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/config_borlandc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Configuration for the Borland/CodeGear C++ Builder compiler
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/config_msc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Configuration for the Microsoft Visual Studio C++ compiler
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/config_winapi.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Configuration file for WINAPI
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/file_stream.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* FILE stream functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/memory.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Memory functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/narrow_string.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Narrow character string functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/system_string.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* System character string functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/types.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Type and type-support definitions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion common/wide_string.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Wide character string functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libbfio],
[20231226],
[20240313],
[[email protected]])

AC_CONFIG_SRCDIR(
Expand Down
2 changes: 1 addition & 1 deletion dpkg/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Upstream-Name: libbfio
Source: https://github.com/libyal/libbfio

Files: *
Copyright: 2009-2023, Joachim Metz <[email protected]>
Copyright: 2009-2024, Joachim Metz <[email protected]>
License: LGPL-3.0+

License: LGPL-3.0+
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Library to support (abstracted) basic file input/output (IO)
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/codepage.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Codepage definitions for libbfio
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/definitions.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Definitions for libbfio
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/error.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The error code definitions for libbfio
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This header should be included in header files that export or import
* library functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/features.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Features of libbfio
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion include/libbfio/types.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Type definitions for libbfio
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Library to support (abstracted) basic file input/output (IO)
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN
VALUE "FileDescription", "Library to support (abstracted) basic file input/output (IO)\0"
VALUE "FileVersion", "@VERSION@" "\0"
VALUE "InternalName", "libbfio.dll\0"
VALUE "LegalCopyright", "(C) 2009-2023, Joachim Metz <[email protected]>\0"
VALUE "LegalCopyright", "(C) 2009-2024, Joachim Metz <[email protected]>\0"
VALUE "OriginalFilename", "libbfio.dll\0"
VALUE "ProductName", "libbfio\0"
VALUE "ProductVersion", "@VERSION@" "\0"
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_codepage.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Codepage functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_definitions.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The internal definitions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_error.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Error functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_error.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Error functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_extern.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The internal extern definition
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_file.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_file.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_file_io_handle.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File IO handle functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
2 changes: 1 addition & 1 deletion libbfio/libbfio_file_io_handle.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* File IO handle functions
*
* Copyright (C) 2009-2023, Joachim Metz <[email protected]>
* Copyright (C) 2009-2024, Joachim Metz <[email protected]>
*
* Refer to AUTHORS for acknowledgements.
*
Expand Down
Loading

0 comments on commit 4fc8d57

Please sign in to comment.