mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-15 15:19:19 +03:00
Prefix all RISC OS print global variables and functions with "ro_" in order to avoid the print_cleanup function name clash in desktop/print.c and
riscos/print.c. svn path=/trunk/netsurf/; revision=4867
This commit is contained in:
parent
611e4f8cbe
commit
48070139d8
@ -89,7 +89,6 @@ bool print_set_up(struct content *content,
|
||||
const struct printer *printer, struct print_settings *settings,
|
||||
double *height)
|
||||
{
|
||||
|
||||
printed_content = print_init(content, settings);
|
||||
|
||||
if (!printed_content)
|
||||
@ -116,7 +115,6 @@ bool print_set_up(struct content *content,
|
||||
bool print_draw_next_page(const struct printer *printer,
|
||||
struct print_settings *settings)
|
||||
{
|
||||
|
||||
/*TODO:Plotter will have to be duplicated and passed
|
||||
as an argument - to allow simultaneous screen and
|
||||
page plotting*/
|
||||
@ -244,7 +242,6 @@ bool print_cleanup(struct content *content,
|
||||
*/
|
||||
struct print_settings *print_make_settings(print_configuration configuration)
|
||||
{
|
||||
|
||||
struct print_settings *settings;
|
||||
|
||||
switch (configuration){
|
||||
|
16
riscos/gui.c
16
riscos/gui.c
@ -1296,8 +1296,8 @@ void ro_gui_user_message(wimp_event_no event, wimp_message *message)
|
||||
|
||||
if (event == wimp_USER_MESSAGE_ACKNOWLEDGE) {
|
||||
#ifdef WITH_PRINT
|
||||
if (print_current_window)
|
||||
print_dataload_bounce(message);
|
||||
if (ro_print_current_window)
|
||||
ro_print_dataload_bounce(message);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -1306,8 +1306,8 @@ void ro_gui_user_message(wimp_event_no event, wimp_message *message)
|
||||
|
||||
case message_DATA_LOAD_ACK:
|
||||
#ifdef WITH_PRINT
|
||||
if (print_current_window)
|
||||
print_cleanup();
|
||||
if (ro_print_current_window)
|
||||
ro_print_cleanup();
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -1404,13 +1404,13 @@ void ro_gui_user_message(wimp_event_no event, wimp_message *message)
|
||||
#ifdef WITH_PRINT
|
||||
case message_PRINT_SAVE:
|
||||
if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
|
||||
print_save_bounce(message);
|
||||
ro_print_save_bounce(message);
|
||||
break;
|
||||
case message_PRINT_ERROR:
|
||||
print_error(message);
|
||||
ro_print_error(message);
|
||||
break;
|
||||
case message_PRINT_TYPE_ODD:
|
||||
print_type_odd(message);
|
||||
ro_print_type_odd(message);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@ -1826,7 +1826,7 @@ void ro_msg_datasave_ack(wimp_message *message)
|
||||
ro_msg_terminate_filename((wimp_full_message_data_xfer*)message);
|
||||
|
||||
#ifdef WITH_PRINT
|
||||
if (print_ack(message))
|
||||
if (ro_print_ack(message))
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
* \todo make use of print stylesheets
|
||||
*/
|
||||
|
||||
struct gui_window *print_current_window = NULL;
|
||||
struct gui_window *ro_print_current_window = NULL;
|
||||
bool print_text_black = false;
|
||||
bool print_active = false;
|
||||
|
||||
@ -200,7 +200,7 @@ void ro_gui_print_prepare(struct gui_window *g)
|
||||
|
||||
assert(g);
|
||||
|
||||
print_current_window = g;
|
||||
ro_print_current_window = g;
|
||||
print_prev_message = 0;
|
||||
|
||||
/* Read Printer Driver name */
|
||||
@ -289,11 +289,11 @@ bool ro_gui_print_apply(wimp_w w)
|
||||
print_max_sheets = sheets;
|
||||
else
|
||||
print_max_sheets = -1;
|
||||
print_current_window->option.background_images =
|
||||
ro_print_current_window->option.background_images =
|
||||
ro_gui_get_icon_selected_state(dialog_print,
|
||||
ICON_PRINT_BG_IMAGES);
|
||||
|
||||
print_send_printsave(print_current_window->bw->current_content);
|
||||
print_send_printsave(ro_print_current_window->bw->current_content);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -346,7 +346,7 @@ void print_send_printsave(struct content *c)
|
||||
LOG(("xwimp_send_message: 0x%x: %s",
|
||||
e->errnum, e->errmess));
|
||||
warn_user("WimpError", e->errmess);
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
}
|
||||
print_prev_message = m.my_ref;
|
||||
}
|
||||
@ -384,16 +384,16 @@ bool print_send_printtypeknown(wimp_message *m)
|
||||
* \param m the bounced message
|
||||
*/
|
||||
|
||||
void print_save_bounce(wimp_message *m)
|
||||
void ro_print_save_bounce(wimp_message *m)
|
||||
{
|
||||
if (m->my_ref == 0 || m->my_ref != print_prev_message)
|
||||
return;
|
||||
|
||||
/* try to print anyway (we're graphics printing) */
|
||||
if (print_current_window) {
|
||||
print_document(print_current_window, "printer:");
|
||||
if (ro_print_current_window) {
|
||||
print_document(ro_print_current_window, "printer:");
|
||||
}
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
}
|
||||
|
||||
|
||||
@ -403,7 +403,7 @@ void print_save_bounce(wimp_message *m)
|
||||
* \param m the message containing the error
|
||||
*/
|
||||
|
||||
void print_error(wimp_message *m)
|
||||
void ro_print_error(wimp_message *m)
|
||||
{
|
||||
pdriver_message_print_error *p = (pdriver_message_print_error*)&m->data;
|
||||
if (m->your_ref == 0 || m->your_ref != print_prev_message)
|
||||
@ -414,7 +414,7 @@ void print_error(wimp_message *m)
|
||||
else
|
||||
warn_user("PrintError", p->errmess);
|
||||
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
}
|
||||
|
||||
|
||||
@ -424,15 +424,15 @@ void print_error(wimp_message *m)
|
||||
* \param m the message to handle
|
||||
*/
|
||||
|
||||
void print_type_odd(wimp_message *m)
|
||||
void ro_print_type_odd(wimp_message *m)
|
||||
{
|
||||
if ((m->your_ref == 0 || m->your_ref == print_prev_message) &&
|
||||
!print_in_background) {
|
||||
/* reply to a previous message (ie printsave) */
|
||||
if (print_current_window && print_send_printtypeknown(m)) {
|
||||
print_document(print_current_window, "printer:");
|
||||
if (ro_print_current_window && print_send_printtypeknown(m)) {
|
||||
print_document(ro_print_current_window, "printer:");
|
||||
}
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
}
|
||||
else {
|
||||
/* broadcast message */
|
||||
@ -462,14 +462,14 @@ void print_type_odd(wimp_message *m)
|
||||
* a fair bit)
|
||||
*/
|
||||
|
||||
bool print_ack(wimp_message *m)
|
||||
bool ro_print_ack(wimp_message *m)
|
||||
{
|
||||
pdriver_info_type info_type;
|
||||
pdriver_type type;
|
||||
os_error *error;
|
||||
|
||||
if (m->your_ref == 0 || m->your_ref != print_prev_message ||
|
||||
!print_current_window)
|
||||
!ro_print_current_window)
|
||||
return false;
|
||||
|
||||
/* read printer driver type */
|
||||
@ -478,15 +478,15 @@ bool print_ack(wimp_message *m)
|
||||
LOG(("xpdriver_info: 0x%x: %s",
|
||||
error->errnum, error->errmess));
|
||||
warn_user("PrintError", error->errmess);
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
return true;
|
||||
}
|
||||
type = info_type >> 16;
|
||||
|
||||
/* print to file */
|
||||
if (!print_document(print_current_window,
|
||||
if (!print_document(ro_print_current_window,
|
||||
m->data.data_xfer.file_name)) {
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ bool print_ack(wimp_message *m)
|
||||
}
|
||||
print_prev_message = m->my_ref;
|
||||
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -521,13 +521,13 @@ bool print_ack(wimp_message *m)
|
||||
* \param m the message to handle
|
||||
*/
|
||||
|
||||
void print_dataload_bounce(wimp_message *m)
|
||||
void ro_print_dataload_bounce(wimp_message *m)
|
||||
{
|
||||
if (m->your_ref == 0 || m->your_ref != print_prev_message)
|
||||
return;
|
||||
|
||||
xosfile_delete(m->data.data_xfer.file_name, 0, 0, 0, 0, 0);
|
||||
print_cleanup();
|
||||
ro_print_cleanup();
|
||||
}
|
||||
|
||||
|
||||
@ -535,12 +535,12 @@ void print_dataload_bounce(wimp_message *m)
|
||||
* Cleanup after printing
|
||||
*/
|
||||
|
||||
void print_cleanup(void)
|
||||
void ro_print_cleanup(void)
|
||||
{
|
||||
if (print_current_window)
|
||||
print_current_window->option.background_images =
|
||||
if (ro_print_current_window)
|
||||
ro_print_current_window->option.background_images =
|
||||
print_bg_images;
|
||||
print_current_window = 0;
|
||||
ro_print_current_window = NULL;
|
||||
print_text_black = false;
|
||||
print_prev_message = 0;
|
||||
print_max_sheets = -1;
|
||||
|
@ -27,14 +27,14 @@
|
||||
|
||||
struct gui_window;
|
||||
|
||||
extern struct gui_window *print_current_window;
|
||||
extern struct gui_window *ro_print_current_window;
|
||||
|
||||
void print_save_bounce(wimp_message *m);
|
||||
void print_error(wimp_message *m);
|
||||
void print_type_odd(wimp_message *m);
|
||||
bool print_ack(wimp_message *m);
|
||||
void print_dataload_bounce(wimp_message *m);
|
||||
void print_cleanup(void);
|
||||
void ro_print_save_bounce(wimp_message *m);
|
||||
void ro_print_error(wimp_message *m);
|
||||
void ro_print_type_odd(wimp_message *m);
|
||||
bool ro_print_ack(wimp_message *m);
|
||||
void ro_print_dataload_bounce(wimp_message *m);
|
||||
void ro_print_cleanup(void);
|
||||
|
||||
#endif /* WITH_PRINT */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user