Subversion Repositories filter_foundry

Rev

Rev 465 | Rev 491 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 465 Rev 488
Line 2... Line 2...
2
<?php
2
<?php
3
 
3
 
4
/*
4
/*
5
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
5
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
6
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
6
    Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
7
    Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft
7
    Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft
8
 
8
 
9
    This program is free software; you can redistribute it and/or modify
9
    This program is free software; you can redistribute it and/or modify
10
    it under the terms of the GNU General Public License as published by
10
    it under the terms of the GNU General Public License as published by
11
    the Free Software Foundation; either version 2 of the License, or
11
    the Free Software Foundation; either version 2 of the License, or
12
    (at your option) any later version.
12
    (at your option) any later version.
Line 67... Line 67...
67
ostype_header("Resource fork types");
67
ostype_header("Resource fork types");
68
ostype_info('aete', 'Apple Event Terminology', 'Apple'); // https://developer.apple.com/library/archive/documentation/mac/pdf/Interapplication_Communication/AE_Term_Resources.pdf
68
ostype_info('aete', 'Apple Event Terminology', 'Apple'); // https://developer.apple.com/library/archive/documentation/mac/pdf/Interapplication_Communication/AE_Term_Resources.pdf
69
//ostype_info('PiMI', 'Plug-in Meta Information', 'Adobe');
69
//ostype_info('PiMI', 'Plug-in Meta Information', 'Adobe');
70
ostype_info('PiPL', 'PlugIn Property List', 'Adobe');
70
ostype_info('PiPL', 'PlugIn Property List', 'Adobe');
71
ostype_info('DATA', 'Generic data (replaced by `tpLT` and `obFS`)', '?');
71
ostype_info('DATA', 'Generic data (replaced by `tpLT` and `obFS`)', '?');
72
ostype_info('tpLT', 'Template for standalone filter resources', 'Telegraphics'); // actually defined by ViaThinkSoft for Filter Foundry
72
ostype_info('tpLT', 'Template for standalone filter resources', 'ViaThinkSoft');
73
ostype_info('obFS', 'Filter Foundry obfuscated data', 'Telegraphics'); // actually defined by ViaThinkSoft
73
ostype_info('obFS', 'Filter Foundry obfuscated data', 'ViaThinkSoft');
74
ostype_info('PARM', 'Filter Factory parameter data (PARM.h)', 'Adobe');
74
ostype_info('PARM', 'Filter Factory parameter data (PARM.h)', 'Adobe');
75
// https://developer.apple.com/library/archive/documentation/mac/pdf/ResEditReference.pdf
75
// https://developer.apple.com/library/archive/documentation/mac/pdf/ResEditReference.pdf
76
// https://developer.apple.com/library/archive/documentation/mac/pdf/MoreMacintoshToolbox.pdf
76
// https://developer.apple.com/library/archive/documentation/mac/pdf/MoreMacintoshToolbox.pdf
77
ostype_info('ALRT', 'Alert (only Macintosh build)', 'Apple');
77
ostype_info('ALRT', 'Alert (only Macintosh build)', 'Apple');
78
ostype_info('DITL', 'Dialog template (only Macintosh build)', 'Apple');
78
ostype_info('DITL', 'Dialog template (only Macintosh build)', 'Apple');
Line 101... Line 101...
101
pipl_property_info('8BIM', 'mode', 'PiPL property "SupportedModes" (PIPL.r)', 'Adobe');
101
pipl_property_info('8BIM', 'mode', 'PiPL property "SupportedModes" (PIPL.r)', 'Adobe');
102
pipl_property_info('8BIM', 'ms32', 'PiPL property "PlugInMaxSize" (PIPL.r)', 'Adobe');
102
pipl_property_info('8BIM', 'ms32', 'PiPL property "PlugInMaxSize" (PIPL.r)', 'Adobe');
103
pipl_property_info('8BIM', 'fici', 'PiPL property "FilterCaseInfo" (PIPL.r)', 'Adobe');
103
pipl_property_info('8BIM', 'fici', 'PiPL property "FilterCaseInfo" (PIPL.r)', 'Adobe');
104
pipl_property_footer();
104
pipl_property_footer();
105
 
105
 
-
 
106
ostype_header("Host signatures");
-
 
107
ostype_info('8BIM', 'Adobe Photoshop', 'Adobe', true);
-
 
108
ostype_info('8BIM', 'PluginCommander (illegal)', 'ISV', true);
-
 
109
ostype_info('8BIM', 'Serif Photoplus (illegal)', 'ISV', true);
-
 
110
ostype_info('8B)M', 'Adobe Premiere', 'Adobe', true);
-
 
111
ostype_info('PMIG', 'GIMP', 'ISV', true);
-
 
112
ostype_info('UP20', 'IrfanView', 'ISV', true);
-
 
113
ostype_info('PSP9', 'JASC PaintShop Pro X', 'ISV', true);
-
 
114
ostype_info('NDP.', 'Paint.net', 'ISV', true);
-
 
115
ostype_footer();
-
 
116
 
-
 
117
ostype_header("Miscellaneous / internal use");
-
 
118
ostype_info('bNUL', 'BUFVERSION_NULL - No Nuffer Suite', 'ViaThinkSoft');
-
 
119
ostype_info('bST1', 'BUFVERSION_STD32 - Standard Buffer Suite 32bit', 'ViaThinkSoft');
-
 
120
ostype_info('bST2', 'BUFVERSION_STD64 - Standard Buffer Suite 64bit', 'ViaThinkSoft');
-
 
121
ostype_info('bSU1', 'BUFVERSION_SUITE32 - PICA Buffer Suite 1.0', 'ViaThinkSoft');
-
 
122
ostype_info('bSU2', 'BUFVERSION_SUITE64 - PICA Buffer Suite 2.0', 'ViaThinkSoft');
-
 
123
ostype_info('hNUL', 'HDLVERSION_NULL - No Handle Suite', 'ViaThinkSoft');
-
 
124
ostype_info('hSTD', 'HDLVERSION_STANDARD - Standard Handle Suite', 'ViaThinkSoft');
-
 
125
ostype_info('hSU1', 'HDLVERSION_SUITE1 - PICA Handle Suite 1.0', 'ViaThinkSoft');
-
 
126
ostype_info('hSU2', 'HDLVERSION_SUITE2 - PICA Handle Suite 2.0', 'ViaThinkSoft');
-
 
127
ostype_footer();
-
 
128
 
106
# ------------------------------------------------------------------------------
129
# ------------------------------------------------------------------------------
107
 
130
 
108
$out = ob_get_contents();
131
$out = ob_get_contents();
109
ob_end_clean();
132
ob_end_clean();
110
 
133
 
Line 112... Line 135...
112
 
135
 
113
file_put_contents(__DIR__.'/os_types.md', $out);
136
file_put_contents(__DIR__.'/os_types.md', $out);
114
 
137
 
115
# ------------------------------------------------------------------------------
138
# ------------------------------------------------------------------------------
116
 
139
 
117
function ostype_info($type, $desc, $vendor) {
140
function ostype_info($type, $desc, $vendor, $no_legality_check=false) {
118
        $dec = 0;
141
        $dec = 0;
119
        for ($i=0;$i<4;$i++) $dec = ($dec<<8) + ord($type[$i]);
142
        for ($i=0;$i<4;$i++) $dec = ($dec<<8) + ord($type[$i]);
120
        $hex = "0x".str_pad(dechex($dec), 8, "0", STR_PAD_LEFT);
143
        $hex = "0x".str_pad(dechex($dec), 8, "0", STR_PAD_LEFT);
121
        $dec = str_pad((string)$dec, strlen((string)hexdec('ffffffff')), " ", STR_PAD_LEFT);
144
        $dec = str_pad((string)$dec, strlen((string)hexdec('ffffffff')), " ", STR_PAD_LEFT);
122
        $desc = str_pad($desc, DESC_WIDTH, " ", STR_PAD_RIGHT);
145
        $desc = str_pad($desc, DESC_WIDTH, " ", STR_PAD_RIGHT);
Line 133... Line 156...
133
        }
156
        }
134
        // In re 8B##, we just assume that 8B## was legally assigned to Adobe by Apple
157
        // In re 8B##, we just assume that 8B## was legally assigned to Adobe by Apple
135
        // Note: "8B" sounds like "Adobe"
158
        // Note: "8B" sounds like "Adobe"
136
        if ((substr($type,0,2) === '8B') && (strpos($vendor,'Adobe') !== false)) $illegal = false;
159
        if ((substr($type,0,2) === '8B') && (strpos($vendor,'Adobe') !== false)) $illegal = false;
137
 
160
 
-
 
161
        if ($no_legality_check) $illegal = false;
-
 
162
 
138
        if ($illegal) $vendor .= ' (illegal)';
163
        if ($illegal) $vendor .= ' (illegal)';
139
        $vendor = str_pad($vendor, VENDOR_WIDTH, " ", STR_PAD_RIGHT);
164
        $vendor = str_pad($vendor, VENDOR_WIDTH, " ", STR_PAD_RIGHT);
140
 
165
 
141
        echo "| `$type` | $dec | $hex | $desc | $vendor |\n";
166
        echo "| `$type` | $dec | $hex | $desc | $vendor |\n";
142
}
167
}