summaryrefslogtreecommitdiffstats
path: root/tools/ppc/magic
blob: 91f4193eaf8da885cf510d7dce2e2c44bfc45995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
# Example magic file for mkhybrid
#
# The "message" for the offset MUST be 4 characters for the CREATOR
# and 4 characters for the TYPE - white space is optional between them.
# Any other characters on this line are ignored. Continuation lines (starting
# with '>') are also ignored i.e. only the initial offset lines are used.
#
# The continuation lines are given here, but they do not need to exist.

#
# James Pearson 20/5/98

# Modified by Christian Walther, 2003/01/17:
#  changed gzip to StuffIt Expander
#  added perl & shell script

# off	type		test		message

# GIF
0	string		GIF8		8BIM GIFf
>4	string		7a		\b, version 8%s,
>4	string		9a		\b, version 8%s,
>6	leshort		>0		%hd x
>8	leshort		>0		%hd,
#>10	byte		&0x80		color mapped,
#>10	byte&0x07	=0x00		2 colors
#>10	byte&0x07	=0x01		4 colors
#>10	byte&0x07	=0x02		8 colors
#>10	byte&0x07	=0x03		16 colors
#>10	byte&0x07	=0x04		32 colors
#>10	byte&0x07	=0x05		64 colors
#>10	byte&0x07	=0x06		128 colors
#>10	byte&0x07	=0x07		256 colors

# JPEG images
#
0	ubeshort		0xffd8		8BIM JPEG  image data

# StuffIt
#
0	string		SIT!		SIT!SIT!

# standard unix compress
0	string		\037\235	LZIV ZIVU
>2	byte&0x80	>0		block compressed
>2	byte&0x1f	x		%d bits

# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
0       string          \037\213        Gzip SITx gzip compressed data
>2      byte            <8              \b, reserved method,
>2      byte            8               \b, deflated,
>3	byte		&0x01		ASCII,
>3	byte		&0x02		continuation,
>3	byte		&0x04		extra field,
>3	byte		&0x08		original filename,
>3	byte		&0x10		comment,
>3	byte		&0x20		encrypted,
>4	ledate		x		last modified: %s,
>8	byte		2		max compression,
>8	byte		4		max speed,
>9	byte		=0x00		os: MS-DOS
>9	byte		=0x01		os: Amiga
>9	byte		=0x02		os: VMS
>9	byte		=0x03		os: Unix
>9	byte		=0x05		os: Atari
>9	byte		=0x06		os: OS/2
>9	byte		=0x07		os: MacOS
>9	byte		=0x0A		os: Tops/20
>9	byte		=0x0B		os: Win/32

# Postscript
0	string		%!		ASPSTEXT
>2	string		PS-Adobe-	conforming
>>11	string		>\0		at level %.3s
>>>15	string		EPS		- type %s
>>>15	string		Query		- type %s
>>>15	string		ExitServer	- type %s
# Some PCs have the annoying habit of adding a ^D as a document separator
0	string		\004%!		ASPS TEXT PostScript document text
>3	string		PS-Adobe-	conforming
>>12	string		>\0		at level %.3s
>>>16	string		EPS		- type %s
>>>16	string		Query		- type %s
>>>16	string		ExitServer	- type %s

# scripts
0	string		#!/usr/bin/perl	McPL TEXT
0	string		#!/bin/sh	ttxt TEXT
$in->ask_warn(N("Error"), N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough '0' (zeroes)."));
- return 1, 6;
- }
- if ($ethntf->{WIRELESS_RATE} && $ethntf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) {
- $in->ask_warn(N("Error"), N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough '0' (zeroes)."));
- return 1, 8;
- }
- },
- next => "wireless2",
- },
-
-
- wireless2 =>
- {
- name => N("Please enter the wireless parameters for this card:"),
- data => sub {
- [
- { label => N("RTS/CTS"), val => \$ethntf->{WIRELESS_RTS},
+ { label => N("RTS/CTS"), val => \$ethntf->{WIRELESS_RTS}, advanced => 1,
help => N("RTS/CTS adds a handshake before each packet transmission to make sure that the
channel is clear. This adds overhead, but increase performance in case of hidden
nodes or large number of active nodes. This parameter sets the size of the
@@ -1221,7 +1200,7 @@ smallest packet for which the node sends RTS, a value equal to the maximum
packet size disable the scheme. You may also set this parameter to auto, fixed
or off.")
},
- { label => N("Fragmentation"), val => \$ethntf->{WIRELESS_FRAG} },
+ { label => N("Fragmentation"), val => \$ethntf->{WIRELESS_FRAG}, advanced => 1 },
{ label => N("Iwconfig command extra arguments"), val => \$ethntf->{WIRELESS_IWCONFIG}, advanced => 1,
help => N("Here, one can configure some extra wireless parameters such as:
ap, channel, commit, enc, power, retry, sens, txpower (nick is already set as the hostname).
@@ -1251,7 +1230,17 @@ those interface specific commands and their effect.
See iwpriv(8) man page for further information."),
}
- ];
+ ];
+ },
+ complete => sub {
+ if ($ethntf->{WIRELESS_FREQ} && $ethntf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) {
+ $in->ask_warn(N("Error"), N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough '0' (zeroes)."));
+ return 1, 6;
+ }
+ if ($ethntf->{WIRELESS_RATE} && $ethntf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) {
+ $in->ask_warn(N("Error"), N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough '0' (zeroes)."));
+ return 1, 8;
+ }
},
post => sub {
# untranslate parameters