Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
7026c149
...
7026c14987f405e64f5ff5b0a8f6e4bfb2706a85
authored
2003-01-15 17:31:32 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added missing NLS markers.
(builtin_concat,builtin_printstr): New functions.
1 parent
8fd182ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
mh/mh_format.c
mh/mh_format.c
View file @
7026c14
...
...
@@ -419,7 +419,7 @@ mh_format (mh_format_t *fmt, message_t msg, size_t msgno,
break
;
default:
mh_error
(
"Unknown opcode: %x"
,
opcode
);
mh_error
(
_
(
"Unknown opcode: %x"
)
,
opcode
);
abort
();
}
}
...
...
@@ -733,7 +733,7 @@ builtin_divide (struct mh_machine *mach)
{
if
(
!
mach
->
arg_num
)
{
mh_error
(
"format: divide by zero"
);
mh_error
(
_
(
"format: divide by zero"
)
);
mach
->
stop
=
1
;
}
else
...
...
@@ -745,7 +745,7 @@ builtin_modulo (struct mh_machine *mach)
{
if
(
!
mach
->
arg_num
)
{
mh_error
(
"format: divide by zero"
);
mh_error
(
_
(
"format: divide by zero"
)
);
mach
->
stop
=
1
;
}
else
...
...
@@ -1640,6 +1640,30 @@ builtin_rcpt (struct mh_machine *mach)
mach
->
arg_num
=
rc
&
rcpt_mask
;
}
static
void
builtin_concat
(
struct
mh_machine
*
mach
)
{
if
(
strobj_len
(
&
mach
->
reg_str
)
==
0
)
strobj_copy
(
&
mach
->
reg_str
,
&
mach
->
arg_str
);
else
{
int
length
=
1
;
length
+=
1
+
strobj_len
(
&
mach
->
reg_str
);
/* reserve en extra space */
length
+=
strobj_len
(
&
mach
->
arg_str
);
strobj_realloc
(
&
mach
->
reg_str
,
length
);
strcat
(
strcat
(
strobj_ptr
(
&
mach
->
reg_str
),
" "
),
strobj_ptr
(
&
mach
->
arg_str
));
}
}
static
void
builtin_printstr
(
struct
mh_machine
*
mach
)
{
print_obj
(
mach
,
mach
->
reg_num
,
&
mach
->
arg_str
);
print_obj
(
mach
,
mach
->
reg_num
,
&
mach
->
reg_str
);
}
/* Builtin function table */
mh_builtin_t
builtin_tab
[]
=
{
...
...
@@ -1717,6 +1741,8 @@ mh_builtin_t builtin_tab[] = {
{
"putaddr"
,
builtin_putaddr
,
mhtype_none
,
mhtype_str
},
{
"unre"
,
builtin_unre
,
mhtype_str
,
mhtype_str
},
{
"rcpt"
,
builtin_rcpt
,
mhtype_num
,
mhtype_str
},
{
"concat"
,
builtin_concat
,
mhtype_none
,
mhtype_str
,
1
},
{
"printstr"
,
builtin_printstr
,
mhtype_none
,
mhtype_str
},
{
0
}
};
...
...
Please
register
or
sign in
to post a comment