471,317 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Proper licensing and copyright attribution for extracted Pythoncode

Hi. I extracted getpath.c out of Python and modified it to make a
generally useful facility for C and C++ programming. These comments
are at the top of my .c file, and I would like to know if they pass
muster for meeting licensing, copyright, and aesthetics requirements:

// -*- Mode: C; fill-column: 79 -*-

//================================================== ===========================
// Description:
// pathToExecutable.c is a module that allows a Unix program to find the
// location of its executable. This capability is extremely useful for
// writing programs that don't have to recompiled in order to be relocated
// within the filesystem. Any auxiliary files (dynamically loaded
// libraries, help files, configuration files, etc.) can just be placed in
// the same directory as the executable, and the function
// pathToExecutable() can be used by the program at runtime to locate its
// executable file and from there the program can locate any auxiliary
// files it needs in order to operate.
// pathToExecutable() is smart enough to follow a symlink (or even a chain
// of symlinks) in order to find the true location of the executable. In
// this manner, for instance, you might install all of the files used by a
// program (let's say it's called "my-program"), including the executable,
// into the directory /usr/local/lib/my-program, and then put a symlink
// into /usr/local/bin that points to the executable
// /usr/local/lib/my-program/my-program. Initially pathToExecutable()
// will identify /usr/local/bin/my-program as the executable, but it will
// then notice that this "file" is really a symbolic link.
// pathToExecutable() will then follow the symbolic link and return
// "/usr/local/lib/my-program/my-pogram" instead.
// Before a program can call pathToExecutable(), setArgv() must be called
// (canonically in main()) so that pathToExecutable() can fetch the value
// of argv[0] and use it to help figure out where the executable is
// located.
// Copyright and licensing information:
// This software is a heavily modified version of getpath.c from the
// Python 2.5.1 release. Both this software and the original software
// from which it is derived are freely distributable under the terms of
// the permissive freeware license, Python Software Foundation License
// Version 2. You can read more about this license here:
// http://www.python.org/psf/license
// The original software from which this software is derived carries the
// following copyright:
// Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python
// Software Foundation.
// The modifications to the original software, which are contained herein,
// are
// Copyright (c) 2007 Douglas Alan <doug AT alum.mit.edu>
//================================================== ===========================

Jun 14 '07 #1
0 977

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Adrian B. | last post: by
3 posts views Thread by Fabio | last post: by
9 posts views Thread by Daniel Keep | last post: by
43 posts views Thread by dan baker | last post: by
20 posts views Thread by Jacob Friis Larsen | last post: by
1 post views Thread by robert d via AccessMonster.com | last post: by
5 posts views Thread by richard.wm.jones | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.