BSD & Linux code exchange? [ was Re: Sockets στην C/C++ ]

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Feb 13 15:30:26 EET 2006


On 2006-02-13 15:20, Panagiotis Atmatzidis <p.atmatzidis at gmail.com> wrote:
>Giorgos Keramidas wrote:
>>
>> Κάθε license εξυπηρετεί κάποιο δικό του σκοπό.
>>
>> Το BSD-licensed netcat είναι διαθέσιμο με διαφορετικούς όρους από
>> το GPL αντίστοιχο, οπότε μπορεί να το χρησιμοποιήσει κάποιος
>> ακόμη και σε non-free BSD-derived προϊόντα.
>>
>> Δε βλέπω κάτι ηλίθιο σε αυτό.
>
> Ναι έχεις απόλυτο δίκιο, αλλά θεωρητικά δεν μπορεί ο ένας να *δει* τον
> κώδικα του άλλου σωστά?

Πολλές φορές, για να 'εξομοιώσεις' ένα πρόγραμμα, αρκεί να δεις το 'API'
του και μόνο:

# SYNOPSIS
#      cat [-benstuv] [file ...]
#
# DESCRIPTION
#
#      The cat utility reads files sequentially, writing them to
#      the standard output.  The file operands are processed in
#      command-line order.  If file is a single dash (`-') or
#      absent, cat reads from the standard input.
#
#      The options are as follows:
#
#      -b      Number the non-blank output lines, starting at 1.
#
#      -e      Display non-printing characters (see the -v option),
#              and display a dollar sign (`$') at the end of each
#              line.
#
#      [...]

Υστερα, ανοίγεις ένα editor της προτίμησής σου, κι αρχίζεις να
γράφεις το πρόγραμμα, σιγά σιγά.

Δε χρειάζεται να 'αντιγράψεις' κανέναν :)




More information about the Hellug mailing list