added proper GPL notice to some files

This commit is contained in:
hneemann 2018-03-02 08:29:25 +01:00
parent f85eea58f9
commit 942c074056
5 changed files with 50 additions and 11 deletions

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2016 Helmut Neemann, Rüdiger Heintz
* Use of this source code is governed by the GPL v3 license
* that can be found in the LICENSE file.
*/
package de.neemann.digital.core.arithmetic;
import de.neemann.digital.core.*;
@ -10,8 +15,6 @@ import static de.neemann.digital.core.element.PinInfo.input;
/**
* A barrel shifter
*
* @author heintz
*/
public class BarrelShifter extends Node implements Element {

View File

@ -1,7 +1,12 @@
/*
* Copyright (c) 2016 Helmut Neemann, Rüdiger Heintz
* Use of this source code is governed by the GPL v3 license
* that can be found in the LICENSE file.
*/
package de.neemann.digital.core.arithmetic;
/**
* @author heintz
* the barrel shifter mode
*/
public enum BarrelShifterMode {
/**

View File

@ -1,10 +1,15 @@
/*
* Copyright (c) 2016 Helmut Neemann, Rüdiger Heintz
* Use of this source code is governed by the GPL v3 license
* that can be found in the LICENSE file.
*/
package de.neemann.digital.core.arithmetic;
import de.neemann.digital.core.ObservableValue;
/**
* @author heintz
* the barrel shifter direction
*/
public enum LeftRightFormat {
/**

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2016 Helmut Neemann, Rüdiger Heintz
* Use of this source code is governed by the GPL v3 license
* that can be found in the LICENSE file.
*/
package de.neemann.digital.gui.components;
import de.neemann.digital.core.*;
@ -19,9 +24,6 @@ import java.util.Arrays;
/**
* Dialog to edit a single value.
* Used to enter a multi bit input value.
*
* @author hneemann
* @author Rüdiger Heintz
*/
public final class SingleValueDialog extends JDialog implements ModelStateObserverTyped {

View File

@ -1,3 +1,8 @@
/*
* Copyright (c) 2016 Helmut Neemann
* Use of this source code is governed by the GPL v3 license
* that can be found in the LICENSE file.
*/
package de.neemann.digital.lang;
import de.neemann.digital.integration.Resources;
@ -11,7 +16,6 @@ import java.util.HashSet;
import java.util.Map;
/**
* Created by hneemann on 20.10.16.
*/
public class TestLang extends TestCase {
private static final String SOURCEPATH = "/home/hneemann/Dokumente/Java/digital/src/main/java";
@ -85,6 +89,8 @@ public class TestLang extends TestCase {
}
private void checkSourceFile(File f, HashSet<String> keys) throws IOException {
int state = 0;
try (BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(f), "utf-8"))) {
int linecount = 0;
String line;
@ -95,9 +101,27 @@ public class TestLang extends TestCase {
} catch (AssertionFailedError e) {
throw new AssertionFailedError(e.getMessage() + " in line " + linecount);
}
switch (state) {
case 0:
if (line.trim().equals("* Use of this source code is governed by the GPL v3 license"))
state = 1;
break;
case 1:
if (line.trim().equals("* that can be found in the LICENSE file."))
state = 2;
else
state = 0;
break;
}
}
}
if (state != 2)
throw new IOException("found file without proper license notice: " + f+ "\n\n"
+"Every java file must contain the lines\n\n"
+"* Use of this source code is governed by the GPL v3 license\n"
+"* that can be found in the LICENSE file.");
}
private static final String PATTERN = "Lang.get(\"";