Update licence to LGPL v3.0 and add generator of package

This commit is contained in:
Edouard Dupin 2012-02-28 09:51:13 +01:00
parent 00568fc30f
commit 6edb7a72a1
10 changed files with 251 additions and 143 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
display.d
display.o
hexViewer
main.d
main.o
package
parameter.d
parameter.o

View File

@ -12,21 +12,12 @@
# Concu Pour le projet hexViwer #
# #
##################################################################################################################
export F_GRAS=
export F_INVERSER=
export F_SOUSLIGNER=
export F_NORMALE=
export F_NOIR=
export F_ROUGE=
export F_VERT=
export F_MARRON=
export F_BLUE=
export F_VIOLET=
export F_CYAN=
export F_GRIS=
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
export CADRE_COTERS=' $(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
#$(info $(VERSION_TAG_SHORT))
VERSION_BUILD_TIME=$(shell date)
#$(info $(VERSION_BUILD_TIME))
CFLAGS= -g -Wall -D_REENTRANT
@ -37,38 +28,22 @@ LIB= -lpthread -lm
CC= g++ $(CFLAGS)
LD= g++
# Liste des fichiers
# List of Sources
SRC=main.c \
display.c \
parameter.c
# Liste des objets
# List of Objects
OBJ= $(SRC:.c=.o)
# Liste des dépendances
# List of dependances
DEP= $(SRC:.c=.d)
PROG_NAME=hexViewer
#
BIN=hexViewer
.PHONY: all
all: encadrer $(BIN)
all: $(PROG_NAME)
encadrer:
ifneq ($(COLOR),normal)
@echo $(CADRE_HAUT_BAS)
@echo $(CADRE_COTERS)
@echo ' DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
@echo ' $(F_VIOLET)$(BIN)$(F_NORMALE) '$(CADRE_COTERS)
@echo $(CADRE_COTERS)
@echo ' $(F_GRIS) Heero Yui Makefile 29-01-2010$(F_NORMALE)'$(CADRE_COTERS)
@echo $(CADRE_HAUT_BAS)
endif
#
%.o: %.c
@echo $(F_VERT)" (.o) $<"$(F_NORMALE)
@$(CC) -o $@ -c $<
@ -76,18 +51,48 @@ endif
%.d: %.c
@echo $(F_BLUE)" (.d) $<"$(F_NORMALE)
@$(CC) -MM -MD -o $@ $<
.PHONY: clean
clean:
rm -f $(BIN) $(OBJ) $(DEP) *.i *.s *.bck
rm -f $(PROG_NAME) $(OBJ) $(DEP) *.i *.s *.bck
$(BIN):$(OBJ)
$(PROG_NAME):$(OBJ)
@echo $(F_ROUGE)" (bin) $@"$(F_NORMALE)
@$(LD) -o $@ $^ $(LIB)
# inclusion des dependances
-include $(DEP)
.PHONY: package
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
package: all
@echo 'Create packages ...'
@mkdir -p package/$(PROG_NAME)/DEBIAN/
@mkdir -p package/$(PROG_NAME)/usr/bin/
@mkdir -p package/$(PROG_NAME)/usr/share/doc/
@mkdir -p package/$(PROG_NAME)/usr/share/edn/
# Create the control file
@echo "Package: "$(PROG_NAME) > package/$(PROG_NAME)/DEBIAN/control
@echo "Version: "$(VERSION_TAG_SHORT) >> package/$(PROG_NAME)/DEBIAN/control
@echo "Section: Development,Editors" >> package/$(PROG_NAME)/DEBIAN/control
@echo "Priority: optional" >>package/$(PROG_NAME)/DEBIAN/control
@echo "Architecture: all" >> package/$(PROG_NAME)/DEBIAN/control
@echo "Depends: bash" >> package/$(PROG_NAME)/DEBIAN/control
@echo "Maintainer: Mr DUPIN Edouard <yui.heero@gmail.com>" >> package/$(PROG_NAME)/DEBIAN/control
@echo "Description: Binary comparator for shell console" >> package/$(PROG_NAME)/DEBIAN/control
@echo "" >> package/$(PROG_NAME)/DEBIAN/control
# Create the PostRm
@#echo "#!/bin/bash" > package/$(PROG_NAME)/DEBIAN/postrm
@#echo "rm ~/."$(PROG_NAME) >> package/$(PROG_NAME)/DEBIAN/postrm
@#echo "" >> package/$(PROG_NAME)/DEBIAN/postrm
# Enable Execution in script
@#chmod 755 package/$(PROG_NAME)/DEBIAN/post*
@#chmod 755 package/$(PROG_NAME)/DEBIAN/pre*
# copy licence and information :
@cp README package/$(PROG_NAME)/usr/share/doc/README
@cp licence.txt package/$(PROG_NAME)/usr/share/doc/copyright
@echo "First generation in progress" >> package/$(PROG_NAME)/usr/share/doc/changelog
@#cp -vf $(PROG_NAME) package/$(PROG_NAME)/usr/bin/
@#cp -vf data/*.xml package/$(PROG_NAME)/usr/share/edn/
@cd package; dpkg-deb --build $(PROG_NAME)

18
README
View File

@ -2,20 +2,6 @@ HexViewer (Hexadevimal Viewer) is a FREE software.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
Terms of license:
Copyright: 2010 Edouard DUPIN, all right reserved
You can:
- Redistribute the sources code and binaries.
- Modify the Sources code.
- Use a part of the sources (less than 50%) in an other software, just write somewhere "HexViewer is great" visible by the user (on your product or on your website with a link to my page).
- Redistribute the modification only if you want.
- Send me the bug-fix (it could be great).
- Pay me a beer or some other things.
- Print the source code on WC paper ...
You can NOT:
- Earn money with this Software (But I can).
- Add malware in the Sources.
- Do something bad with the sources.
- Use it to travel in the space with a toaster.
I reserve the right to change this licence. If it change the version of the copy you have keep its own license
License: GNU Lesser General Public License (LGPL) v3.0

View File

@ -1,11 +1,11 @@
/**
*******************************************************************************
* @file display.c
* @brief Editeur De N'ours :
* @brief main display system of the hexViewer (Sources)
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
@ -13,12 +13,7 @@
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/

View File

@ -1,11 +1,11 @@
/**
*******************************************************************************
* @file display.h
* @brief Editeur De N'ours :
* @brief main display system of the hexViewer (Header)
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
@ -13,12 +13,7 @@
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/

View File

@ -1,11 +1,11 @@
/**
*******************************************************************************
* @file generalDefine.h
* @brief Editeur De N'ours :
* @brief generic basic defines
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
@ -13,12 +13,7 @@
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/

165
licence.txt Normal file
View File

@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

53
main.c
View File

@ -1,26 +1,19 @@
/**
*******************************************************************************
* @file main.c
* @brief Editeur De N'ours :
* @brief Main function (sources)
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @version $Id$
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This 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 3 of the License, or (at your option) any later
* version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
* ANY WARRANTY.
*
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/
@ -46,13 +39,13 @@ void usage(void)
printf("\t\t[a] Go to the start of the files\n");
printf("\t\t[z] Go to the end of the files (the first push is the File 1, the second push is the file 2) \n");
printf("\t\t[q] Quit the curent program\n");
printf("\t\t[s] Change the view of the propram of the size of interpretation (8 bits, 16 bits, 32 bits)\n");
printf("\t\t[s] Change the view of the propram of the size of interpretation (8/16/32/64 bits)\n");
printf("\t\t[t] Change the interpretation of Data (hexedecimal, Signed Decimal, Unigned Decimal)\n");
printf("\t\t[f] Find the first Error when comparing the two files\n");
printf("\t\t[UP] Go up 5 line in the view\n");
printf("\t\t[DOWN] Go down 5 line in the view\n");
printf("\t\t[LEFT] Go up 50 line in the view (one screen)\n");
printf("\t\t[RIGHT] Go down 50 line in the view (one screen)\n");
printf("\t\t[UP] Go up (5 lines)\n");
printf("\t\t[DOWN] Go down (5 lines)\n");
printf("\t\t[LEFT] Go up (one screen)\n");
printf("\t\t[RIGHT] Go down (one screen)\n");
printf("\t\tAdd padding : \n");
printf("\t\t\t[o] Add 1 Byte padding at the left file\n");
printf("\t\t\t[O] Add 16 Bytes padding at the left file\n");
@ -60,35 +53,13 @@ void usage(void)
printf("\t\t\t[P] Add 16 Bytes padding at the right file\n");
printf("\t\t\t[m] reset padding\n");
printf("\t\n");
/*
printf("\tTODO : \n");
printf("\t\t- The print of 128 bytes\n");
printf("\t\t- The print in Octal\n");
printf("\t\t- The print in Binary\n");
printf("\t\t- The Modification of the file\n");
printf("\t\t- The Saving of the file\n");
printf("\t\t- The information that one of the files has been update\n");
printf("\t\t- To reload the two files ==> [U]\n");
printf("\t\t- The windows scroling with the mouse\n");
printf("\t\t- The selection with the mouse\n");
printf("\t\t- The display on char view\n");
printf("\t\t- The scroling Bar on the right\n");
printf("\t\t- Add to the croling bar the differences in the two files\n");
printf("\t\t- The research of a sequency in the two files ==> [R]\n");
printf("\t\t- The jump to an offset directly ==> [J] \n");
*/
/*printf("\t\t- \n");*/
printf("\tCopyright: 2010 Edouard DUPIN, all right reserved\n");
printf("\tLicense: GNU Lesser General Public License (LGPL) v3.0\n");
}
int32_t findFirstDiff(void)
{
uint8_t data1, data2;

View File

@ -1,11 +1,11 @@
/**
*******************************************************************************
* @file parameter.c
* @brief Editeur De N'ours :
* @brief Parameters area (Sources)
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
@ -13,12 +13,7 @@
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/

View File

@ -1,26 +1,19 @@
/**
*******************************************************************************
* @file parameter.h
* @brief Editeur De N'ours :
* @brief Parameters area (header)
* @author Edouard DUPIN
* @date 05/02/2011
* @par Project
* Edn tool : hexViewer
* hexViewer
*
* @version $Id$
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This 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 3 of the License, or (at your option) any later
* version.
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
* ANY WARRANTY.
*
* Licence : GNU Lesser General Public License (LGPL) v3.0
*
*******************************************************************************
*/