about summary refs log tree commit diff stats
path: root/apps/ex2.subx
blob: 8df4c62c217f6a55b7d4e3851cb23fc115b5be4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Add 1 and 1, and return the result in the exit code.
#
# To run:
#   $ ./subx translate init.linux examples/ex2.subx -o examples/ex2
#   $ ./subx run examples/ex2
# Expected result:
#   $ echo $?
#   2

== code

Entry:
# ebx = 1
bb/copy-to-ebx  1/imm32
# increment ebx
43/increment-ebx
# exit(ebx)
e8/call  syscall_exit/disp32

# . . vim:nowrap:textwidth=0
light .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * preferences.h
 *
 * Copyright (C) 2012 James Booth <boothj5@gmail.com>
 *
 * This file is part of Profanity.
 *
 * Profanity is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Profanity is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Profanity.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef PREFERENCES_H
#define PREFERENCES_H

#include "config.h"

#include <glib.h>

#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#endif
#ifdef HAVE_NCURSES_NCURSES_H
#include <ncurses/ncurses.h>
#endif

#define PREFS_MIN_LOG_SIZE 64
#define PREFS_MAX_LOG_SIZE 1048580

void prefs_load(void);
void prefs_close(void);

char * prefs_find_login(char *prefix);
void prefs_reset_login_search(void);
char * prefs_autocomplete_boolean_choice(char *prefix);
void prefs_reset_boolean_choice(void);

gboolean prefs_get_beep(void);
void prefs_set_beep(gboolean value);
gboolean prefs_get_flash(void);
void prefs_set_flash(gboolean value);
gboolean prefs_get_chlog(void);
void prefs_set_chlog(gboolean value);
gboolean prefs_get_history(void);
void prefs_set_history(gboolean value);
gboolean prefs_get_showsplash(void);
void prefs_set_showsplash(gboolean value);
gboolean prefs_get_vercheck(void);
void prefs_set_vercheck(gboolean value);
gboolean prefs_get_intype(void);
void prefs_set_intype(gboolean value);
gboolean prefs_get_states(void);
void prefs_set_states(gboolean value);
gboolean prefs_get_outtype(void);
void prefs_set_outtype(gboolean value);

void prefs_set_notify_message(gboolean value);
gboolean prefs_get_notify_message(void);
void prefs_set_notify_typing(gboolean value);
gboolean prefs_get_notify_typing(void);
void prefs_set_notify_remind(gint period);
gint prefs_get_notify_remind(void);
void prefs_set_max_log_size(gint value);
gint prefs_get_max_log_size(void);
void prefs_set_priority(gint value);
gint prefs_get_priority(void);

void prefs_add_login(const char *jid);

NCURSES_COLOR_T prefs_get_bkgnd();
NCURSES_COLOR_T prefs_get_titlebar();
NCURSES_COLOR_T prefs_get_statusbar();
NCURSES_COLOR_T prefs_get_titlebartext();
NCURSES_COLOR_T prefs_get_titlebarbrackets();
NCURSES_COLOR_T prefs_get_statusbartext();
NCURSES_COLOR_T prefs_get_statusbarbrackets();
NCURSES_COLOR_T prefs_get_statusbaractive();
NCURSES_COLOR_T prefs_get_statusbarnew();
NCURSES_COLOR_T prefs_get_maintext();
NCURSES_COLOR_T prefs_get_splashtext();
NCURSES_COLOR_T prefs_get_online();
NCURSES_COLOR_T prefs_get_away();
NCURSES_COLOR_T prefs_get_chat();
NCURSES_COLOR_T prefs_get_dnd();
NCURSES_COLOR_T prefs_get_xa();
NCURSES_COLOR_T prefs_get_offline();
NCURSES_COLOR_T prefs_get_typing();
NCURSES_COLOR_T prefs_get_gone();
NCURSES_COLOR_T prefs_get_error();
NCURSES_COLOR_T prefs_get_incoming();
NCURSES_COLOR_T prefs_get_roominfo();
NCURSES_COLOR_T prefs_get_me();
NCURSES_COLOR_T prefs_get_them();

#endif