Commit 55503757 authored by Aaron M. Ucko's avatar Aaron M. Ucko

Load fltk-1.1.3 into branches/upstream/current.

parent 3a30e2c5
This diff is collapsed.
This diff is collapsed.
CREDITS - Fast Light Tool Kit (FLTK) Version 1.1.0
-------------------------------------------------
This file lists the people responsible for the toolkit you
are now using. If you've looking for your name in lights
but we've forgotten you here, please send an email to
"fltk-bugs@fltk.org" and we'll update this file accordingly.
CORE DEVELOPERS
The following people do the day-to-day development of FLTK:
Craig P. Earls
Curtis Edwards (trilex@users.sourceforge.net)
Gustavo Hime (hime@users.sourceforge.net)
Talbot Hughes
Robert Kesterson (robertk@users.sourceforge.net)
Matthias Melcher (matthias@users.sourceforge.net)
James Dean Palmer (jamespalmer@users.sourceforge.net)
Vincent Penne (vincentp@users.sourceforge.net)
Bill Spitzak (spitzak@users.sourceforge.net)
Michael Sweet (easysw@users.sourceforge.net)
Carl Thompson (clip@users.sourceforge.net)
Nafees Bin Zafar (nafees@users.sourceforge.net)
OTHER CONTRIBUTORS
The following people have contributed fixes or enhancements
for FLTK:
Teun Burgers
Paul Chambers
Fabien Costantini
Stephen Davies
Greg Ercolano
Yuri Fedorchenko
George Garvey
Mikael Hultgren
Stuart Levy
Howard Lightstone
Mike Lindner
Alexander Mai
Alexander Rabi
James Roth
Albrecht Schlosser
Andrea Suatoni
Paul Sydney
Emanuele Vicentini
Jim Wilson
Ken Yarnall
StuffIt (c)1997-1998 Aladdin Systems, Inc., http://www.aladdinsys.com/StuffIt/
/*
* FluidPanel.h - 'Fluid Panel' Drop-In Preferences
*
* Copyright 1995-2002 Metrowerks Inc. All rights reserved.
*
*/
#ifndef _H_FluidPanel
#define _H_FluidPanel
#ifndef __TYPES__
# include <Types.h>
#endif
#pragma options align=mac68k
/* this is the name of the panel, as shown in the Finder */
#define kFluidPanelName "Fluid Panel"
/*
* AppleScript dictionary info. As a rule of thumb, dropin panels should use the
* same terminology and numeric code in their 'aete' that the IDE uses if there
* is already a similar item in the IDE's 'aete'. That is the case here, so we
* merely duplicate applicable 68K Project and 68K Linker user terms below.
*/
enum {
/* Symbolic Name Code AETE Terminology */
class_Fluid = 'Flid',
prefsPR_ProjectType = 'PR01', /* Project Type */
prefsPR_FileName = 'PR02', /* File Name */
prefsLN_GenerateSymFile = 'LN02', /* Generate SYM File */
/* enumeration for project type */
enumeration_ProjectType = 'PRPT',
enum_Project_Application = 'PRPA', /* application */
enum_Project_Library = 'PRPL', /* library */
enum_Project_SharedLibrary = 'PRPS', /* shared library */
enum_Project_CodeResource = 'PRPC', /* code resource */
enum_Project_MPWTool = 'PRPM' /* MPW tool */
};
/* internal codes for project type */
enum {
kProjTypeApplication,
kProjTypeLibrary,
kProjTypeSharedLib,
kProjTypeCodeResource,
kProjTypeMPWTool
};
/* This is the structure that is manipulated by the panel. The Fluid
* compiler & linker both "know" about this structure.
*/
typedef struct FluidPref {
short version; /* version # of prefs data */
short projtype; /* project type */
char outfile[32]; /* output file name */
Boolean linksym; /* generate SYM file */
short dotx; /* position of dot (!) */
short doty;
} FluidPref, **FluidPrefHandle;
#pragma options align=reset
#endif /* _H_FluidPanel */
/*
* Fluid Tool.c - Fluid Tool (68K and PowerPC) for CodeWarrior IDE
*
* Based on Metrowerks Sample Plugin:
* Copyright 1995-2002 Metrowerks Inc. All rights reserved.
*
*/
/* standard headers */
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stat.h>
#include <errno.h>
/* system headers */
#if macintosh
#include <Files.h>
#include <Strings.h>
#endif
/* compiler headers */
#include "DropInCompilerLinker.h"
#include "CompilerMapping.h"
#include "CWPluginErrors.h"
/* project headers */
#include "../commonFiles/FluidPanel.h"
/* prototypes of local functions */
static CWResult Compile(CWPluginContext context);
static CWResult ProcessFile(CWPluginContext context, const char* text, Boolean include);
static CWResult ParseText(CWPluginContext context, const char* text);
static CWResult IncludeFile(CWPluginContext context, const char* inclname,
Boolean fullSearch);
int IsNewlineChar(char c);
/* local variables */
static long linecount;
#if CW_USE_PRAGMA_EXPORT
#pragma export on
#endif
/**
* inform the API about our capabilities by returning the DropInFlags structure
*/
CWPLUGIN_ENTRY(CWPlugin_GetDropInFlags)(const DropInFlags** flags, long* flagsSize)
{
static const DropInFlags sFlags = {
kCurrentDropInFlagsVersion,
CWDROPINCOMPILERTYPE,
DROPINCOMPILERLINKERAPIVERSION_7,
/*kCanpreprocess | */ kCompAllowDupFileNames,
Lang_MISC,
DROPINCOMPILERLINKERAPIVERSION
};
*flags = &sFlags;
*flagsSize = sizeof(sFlags);
return cwNoErr;
}
CWPLUGIN_ENTRY(CWPlugin_GetDropInName)(const char** dropinName)
{
static const char* sDropInName = "Fluid Resource Compiler";
*dropinName = sDropInName;
return cwNoErr;
}
CWPLUGIN_ENTRY(CWPlugin_GetDisplayName)(const char** displayName)
{
static const char* sDisplayName = "Fluid Resource Compiler";
*displayName = sDisplayName;
return cwNoErr;
}
CWPLUGIN_ENTRY(CWPlugin_GetPanelList)(const CWPanelList** panelList)
{
static const char* sPanelName = "Fluid Panel";
static CWPanelList sPanelList = {kCurrentCWPanelListVersion, 1, &sPanelName};
*panelList = &sPanelList;
return cwNoErr;
}
/**
* tell CW about the processors and platforms that we support
* (which would be any that we can compile Fluid under)
*/
CWPLUGIN_ENTRY(CWPlugin_GetTargetList)(const CWTargetList** targetList)
{
static CWDataType sCPU = targetCPUAny;
static CWDataType sOS = targetOSAny;
static CWTargetList sTargetList = {kCurrentCWTargetListVersion, 1, &sCPU, 1, &sOS};
*targetList = &sTargetList;
return cwNoErr;
}
/**
* tell CW which file types we can process
*/
CWPLUGIN_ENTRY(CWPlugin_GetDefaultMappingList)(const CWExtMapList** defaultMappingList)
{
static CWExtensionMapping sExtension = {'TEXT', ".fl", 0};
static CWExtMapList sExtensionMapList = {kCurrentCWExtMapListVersion, 1, &sExtension};
*defaultMappingList = &sExtensionMapList;
return cwNoErr;
}
#if CW_USE_PRAGMA_EXPORT
#pragma export off
#endif
/*
* main - main entry-point for Drop-In Fluid Tool
*
*/
CWPLUGIN_ENTRY(main)(CWPluginContext context)
{
short result;
long request;
if (CWGetPluginRequest(context, &request) != cwNoErr)
return cwErrRequestFailed;
result = cwNoErr;
/* dispatch on compiler request */
switch (request)
{
case reqInitCompiler:
/* compiler has just been loaded into memory */
break;
case reqTermCompiler:
/* compiler is about to be unloaded from memory */
break;
case reqCompile:
{
Boolean pp;
result = CWIsPreprocessing( context, &pp );
//if ( pp )
result = Compile(context);
}
break;
default:
result = cwErrRequestFailed;
break;
}
/* return result code */
return (result);
}
/**
* check if the path points to an executable file
*/
static char exist( const char *filename )
{
struct stat eStat;
int ret = stat( filename, &eStat );
if ( ret != 0 ) return 0;
if ( eStat.st_mode && S_IEXEC ) return 1;
return 0;
}
/**
* call (or incorporate) Fluid with our source file as an argument
*/
static CWResult Compile(CWPluginContext context)
{
CWResult err;
CWFileSpec sourcefile;
int ret;
char preFileAction = 0;
char *fluidCmd = 0;<