On Tue, 28 Jun 2011, Jürgen Lüters wrote:
copyright law at least in europe, northamerica and japan protects the
work computer program in our case. The law does protect programms in
binary and text form.
The law does _not_ protect ideas and concepts.
Several programs can implement the same algorithms. As long as the
implementation is different there is no problem. That the implenmtation
is different can be shown by source code comparison. Clean room
The fact the the "implementation is different" does not mean that you can
escape the copyright. This "different implementation" may still be based
on earlier, copyrighted work. A source code comparison may not show this.
I'll give you an example. I downloaded ESR:s "hexdump 1.7" from
http://www.catb.org/~esr/hexdump/. The C file is 289 lines long. Then, I
changed a few variable names, removed the comments, changed the order of
the include files and a few other trivial changes. With just these small
changes, the "comparator" can no longer find any common code segments:
#SCF-B 2.0
Filtering: language
Hash-Method: RXOR
Matches: 0
Merge-Program: comparator 2.8
Normalization: line-oriented
Shred-Size: 3
%%
hexdump-mine: matches=0, matchlines=0, totallines=277
hexdump-1.7: matches=0, matchlines=0, totallines=627
%%
Does this mean that the code is now mine, that I can put my own copyright
on it, that I can use it without obeying the original license, and that
Eric S Raymond can no longer claim any copyright on it? No. I used his
work to create "my different implementation". This means that I must still
respect his copyright.
So to "work on making FreeRDP show 0% match with rdesktop" does not really
help. Even if you reach this goal, the code would still be based on
earlier copyrighted work, and the GPL must still be respected.
Rgds,
---
Peter Åstrand ThinLinc Chief Developer
Cendio AB http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#define W_D 16
#define MAXWIDTH 32
typedef int Bool;
#define TRUE 1
#define FALSE 0
static long linesize = W_D;
static Bool cflag = FALSE;
static Bool eflag = FALSE;
static Bool gflag = FALSE;
static long dWstart = 0L;
static long length = 0L;
static char ebcdic[] =
{
' ','.','.','.','.','.','.','.','.','.','[','.','<','(','+','!',
'&','.','.','.','.','.','.','.','.','.',']','$','*',')',';','^',
'-','/','.','.','.','.','.','.','.','.','|',',','%','_','>','?',
'.','.','.','.','.','.','.','.','.','`',':','#','@','\'','=','"',
'.','a','b','c','d','e','f','g','h','i','.','.','.','.','.','.',
'.','j','k','l','m','n','o','p','q','r','.','.','.','.','.','.',
'.','~','s','t','u','v','w','x','y','z','.','.','.','.','.','.',
'.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.',
'{','A','B','C','D','E','F','G','H','I','.','.','.','.','.','.',
'}','J','K','L','M','N','O','P','Q','R','.','.','.','.','.','.',
'\\','.','S','T','U','V','W','X','Y','Z','.','.','.','.','.','.',
'0','1','2','3','4','5','6','7','8','9','.','.','.','.','.','.',
};
static void dumpfile(FILE *f)
{
int ch = '\0';
char ascii[MAXWIDTH+3];
int i = 0;
int ai = 0;
int offset = 0;
int hpos;
long SF = dWstart;
long len_f = length;
char *esctokens = "\b\f\n\r\t";
char *escapes = "bfnrt";
char *cp;
do {
ch = getc(f);
if (ch != EOF)
{
if (dWstart && SF-- > 0)
continue;
if (length && len_f-- <= 0) {
ch = EOF;
}
}
if (ch != EOF)
{
if (i++ % linesize == 0)
{
(void) printf("%04x ", offset);
offset += linesize;
hpos = 5;
}
if (!gflag) {
if ((i-1) % (linesize/2)==0)
{
(void) putchar(' ');
hpos++;
ascii[ai++] = ' ';
}
}
if (eflag)
{
ascii[ai] = (ch >= 0x40) ? ebcdic[ch - 0x40] : '.';
if (cflag && (ascii[ai] != '.' || ch == ebcdic['.']))
(void) printf("%c ", ascii[ai]);
else if (cflag && ch && (cp = strchr(esctokens, ch)))
(void) printf("\\%c ", escapes[cp - esctokens]);
else
(void) printf("%02x ", ch);
}
else
{
ascii[ai] = (isprint (ch) || ch == ' ') ? ch : '.';
if (cflag && (isprint(ch) || ch == ' '))
(void) printf("%c ", ch);
else if (cflag && ch && (cp = strchr(esctokens, ch)))
(void) printf("\\%c ", escapes[cp - esctokens]);
else
(void) printf("%02x ", ch);
}
++ai;
hpos += 3;
}
if (i&&(ch==EOF||(i%linesize==0)))
{
if (!cflag)
{
while (hpos < linesize * 3 + 7)
{
hpos++;
(void) putchar(' ');
}
ascii[ai] = '\0';
(void) printf("%s", ascii);
}
if (ch != EOF || (i % linesize != 0))
(void) putchar('\n');
ai = 0;
} /* wow, this was tricky */
} while (ch != EOF);
}
static long getoffs(char *checkpoint)
{
Bool foundzero = FALSE;
long lval = 0;
int boff = 0;
char *numbaz = "0123456789abcdefABCDEF";
for (;*checkpoint;checkpoint++)
if (*checkpoint == '0')
foundzero = TRUE;
else if (isdigit(*checkpoint))
{
boff = 10;
break;
}
else if (*checkpoint == 'x' || *checkpoint == 'X' || *checkpoint == 'h'
|| *checkpoint == 'H')
{
checkpoint++;
boff = 16;
break;
} else {
return(-1L);
}
if (boff == 0)
if (foundzero)
boff = 10;
else
return(-1L);
if (boff == 10)
{
for (; *checkpoint; checkpoint++)
if (isdigit(*checkpoint))
lval = lval * 10 + (*checkpoint - '0');
else return(-1L);
}
else
{
for (; *checkpoint; checkpoint++)
if (strchr(numbaz, *checkpoint))
lval = lval*16 + (strchr(numbaz, tolower(*checkpoint))-numbaz);
else
return(-1L);
}
return(lval);
}
int main(int unix_argc, char **argv) {
FILE *infile;
int dumpcount = 0;
char *CP;
setlocale (LC_CTYPE, "");
for (argv++, unix_argc--; unix_argc > 0; argv++, unix_argc--)
{
char s = **argv;
if (s == '-' || s == '+')
{
int c = *++*argv;
switch (c)
{
case 'V':
printf("hex " RELEASE " by Eric S. Raymond.\n");
exit(0);
case 'e': eflag = (s == '-'); continue;
case 'c': cflag = (s == '-'); continue;
case 'g': gflag = (s == '-'); continue;
case 's':
if ((*argv)[1]) {
(*argv)++;
} else {
unix_argc--, argv++;
}
if (s == '-' && unix_argc >= 0)
{
if (CP = strchr(*argv, ','))
*CP++ = '\0';
if ((dWstart = getoffs(*argv)) == -1L)
{
(void) fputs("hex: dWstart offset no good\n", stderr);
exit(0);
}
if (CP)
if ((length = getoffs(CP)) == -1L) {
(void) fputs("hex: length no good\n", stderr);
exit(0);
}
}
else
dWstart = length = 0L;
continue;
case '\0':
infile = stdin;
break;
case 'w':
if ((*argv)[1])
(*argv)++;
else
unix_argc--, argv++;
if ((linesize = getoffs(*argv)) == -1L || linesize > MAXWIDTH)
{
(void) fputs("hex: line width no good\n", stderr);
exit(0);
}
if (linesize % 2)
gflag = TRUE;
continue;
default:
(void) fprintf(stderr, "hex: no such option as %s\n", *argv);
exit(0);
}
}
else if ((infile = fopen(*argv, "rb")) == NULL)
{
(void) fprintf(stderr, "hex: cannot open %s\n", *argv);
exit(1);
}
if (dumpcount > 0 || unix_argc > 1)
if (infile == stdin)
(void) printf("---- <Standard input> ----\n");
else
(void) printf("---- %s ----\n", *argv);
dumpfile(infile);
dumpcount++;
if (infile != stdin)
(void) fclose(infile);
}
if (dumpcount == 0)
dumpfile(stdin);
return(0);
}
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Freerdp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freerdp-devel