basis for other terminal-involving applications: a stub
implementation of the printing interface, an additional function in
notiming.c, and also I've renamed the front-end function beep() to
do_beep() so as not to clash with beep() in lib[n]curses.
git-svn-id: http://svn.tartarus.org/sgt/putty@6479
cda61777-01e9-0310-a592-
d414129be87e
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
-void beep(void *frontend, int mode)
+void do_beep(void *frontend, int mode)
{
if (mode != BELL_VISUAL)
SysBeep(30);
{
if (mode != BELL_VISUAL)
SysBeep(30);
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
-void beep(void *frontend, int mode)
+void do_beep(void *frontend, int mode)
{
//SessionWindow *win = (SessionWindow *)frontend;
if (mode != BELL_VISUAL)
{
//SessionWindow *win = (SessionWindow *)frontend;
if (mode != BELL_VISUAL)
--- /dev/null
+/*
+ * Stub implementation of the printing interface for PuTTY, for the
+ * benefit of non-printing terminal applications.
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include "putty.h"
+
+struct printer_job_tag {
+ int dummy;
+};
+
+printer_job *printer_start_job(char *printer)
+{
+ return NULL;
+}
+
+void printer_job_data(printer_job *pj, void *data, int len)
+{
+}
+
+void printer_finish_job(printer_job *pj)
+{
+}
+
+printer_enum *printer_start_enum(int *nprinters_ptr)
+{
+ *nprinters_ptr = 0;
+ return NULL;
+}
+char *printer_get_name(printer_enum *pe, int i)
+{
+ return NULL;
+}
+void printer_finish_enum(printer_enum *pe)
+{
+}
- * notiming.c: stub version of schedule_timer().
+ * notiming.c: stub version of timing API.
- * Used in key generation tools, which need the random number
- * generator but don't want the hassle of calling noise_regular()
- * at regular intervals - and don't _need_ it either, since they
+ * Used in any tool which needs a subsystem linked against the
+ * timing API but doesn't want to actually provide timing. For
+ * example, key generation tools need the random number generator,
+ * but they don't want the hassle of calling noise_regular() at
+ * regular intervals - and they don't _need_ it either, since they
* have their own rigorous and different means of noise collection.
*/
* have their own rigorous and different means of noise collection.
*/
+
+void expire_timer_context(void *ctx)
+{
+}
#pragma noreturn(fatalbox)
#pragma noreturn(modalfatalbox)
#endif
#pragma noreturn(fatalbox)
#pragma noreturn(modalfatalbox)
#endif
-void beep(void *frontend, int);
+void do_beep(void *frontend, int);
void begin_session(void *frontend);
void sys_cursor(void *frontend, int x, int y);
void request_paste(void *frontend);
void begin_session(void *frontend);
void sys_cursor(void *frontend, int x, int y);
void request_paste(void *frontend);
* Perform an actual beep if we're not overloaded.
*/
if (!term->cfg.bellovl || !term->beep_overloaded) {
* Perform an actual beep if we're not overloaded.
*/
if (!term->cfg.bellovl || !term->beep_overloaded) {
- beep(term->frontend, term->cfg.beep);
+ do_beep(term->frontend, term->cfg.beep);
if (term->cfg.beep == BELL_VISUAL) {
term_schedule_vbell(term, FALSE, 0);
if (term->cfg.beep == BELL_VISUAL) {
term_schedule_vbell(term, FALSE, 0);
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
* may want to perform additional actions on any kind of bell (for
* example, taskbar flashing in Windows).
*/
-void beep(void *frontend, int mode)
+void do_beep(void *frontend, int mode)
{
if (mode != BELL_VISUAL)
gdk_beep();
{
if (mode != BELL_VISUAL)
gdk_beep();
-void beep(void *frontend, int mode)
+void do_beep(void *frontend, int mode)
{
if (mode == BELL_DEFAULT) {
/*
{
if (mode == BELL_DEFAULT) {
/*