From 54ce16eaebe3017d870d3abd8534628370ec7084 Mon Sep 17 00:00:00 2001 From: Simon Naarmann Date: Sun, 11 Jun 2023 17:03:26 +0200 Subject: [PATCH] Fix #53: in X* -> const(X)* for DMD 2.104.0 The D keyword "in" for function parameters means "scope const ref" and DMD 2.104.0, released 2023-06-01, is beginning to warn about using "in" during extern(C). More information: https://dlang.org/changelog/2.104.0.html#dmd.in-externd DMD 2.104.0 Release Notes: Using in parameters with non-extern(D)/extern(C++) functions is deprecated https://dlang.org/changelog/2.101.0.html#dmd.previewInLink DMD 2.101.0 Release Notes: -preview=in disabled for non-D-non-C++ linkage: in "is D centric, as it is an enhanced version of "scope const ref". As non-extern(D) functions usually are expected to match a specific ABI, using in is hardly a good idea." This is an automatic conversion of all function parameters of form "in X* " or "in X *" without quotes to "const(X)* " without quotes. I've reviewed each change myself. --- allegro5/al_debug.d | 4 +- allegro5/allegro_audio.d | 110 +++++++++++++++---------------- allegro5/allegro_color.d | 8 +-- allegro5/allegro_color_ret.d | 4 +- allegro5/allegro_font.d | 50 +++++++------- allegro5/allegro_memfile.d | 2 +- allegro5/allegro_native_dialog.d | 18 ++--- allegro5/allegro_primitives.d | 24 +++---- allegro5/allegro_ttf.d | 8 +-- allegro5/allegro_video.d | 2 +- allegro5/bitmap_io.d | 24 +++---- allegro5/config.d | 26 ++++---- allegro5/display.d | 2 +- allegro5/events.d | 4 +- allegro5/file.d | 24 +++---- allegro5/fshook.d | 26 ++++---- allegro5/joystick.d | 14 ++-- allegro5/keyboard.d | 2 +- allegro5/memory.d | 16 ++--- allegro5/mouse.d | 4 +- allegro5/path.d | 38 +++++------ allegro5/system.d | 6 +- allegro5/threads.d | 2 +- allegro5/timer.d | 6 +- allegro5/tls.d | 2 +- allegro5/transformations.d | 12 ++-- allegro5/utf8.d | 102 ++++++++++++++-------------- 27 files changed, 270 insertions(+), 270 deletions(-) diff --git a/allegro5/al_debug.d b/allegro5/al_debug.d index 4c63641..dc6c0fd 100644 --- a/allegro5/al_debug.d +++ b/allegro5/al_debug.d @@ -2,6 +2,6 @@ module allegro5.al_debug; nothrow @nogc extern (C) { - void al_register_assert_handler(void function(in char* expr, in char* file, int line, in char* func) handler); - void al_register_trace_handler(void function(in char*) handler); + void al_register_assert_handler(void function(const(char)* expr, const(char)* file, int line, const(char)* func) handler); + void al_register_trace_handler(void function(const(char)*) handler); } diff --git a/allegro5/allegro_audio.d b/allegro5/allegro_audio.d index 8a93a2e..d11088d 100644 --- a/allegro5/allegro_audio.d +++ b/allegro5/allegro_audio.d @@ -109,27 +109,27 @@ nothrow @nogc extern (C) ALLEGRO_SAMPLE_INSTANCE* al_create_sample_instance(ALLEGRO_SAMPLE* data); void al_destroy_sample_instance(ALLEGRO_SAMPLE_INSTANCE* spl); - uint al_get_sample_frequency(in ALLEGRO_SAMPLE* spl); - uint al_get_sample_length(in ALLEGRO_SAMPLE* spl); - ALLEGRO_AUDIO_DEPTH al_get_sample_depth(in ALLEGRO_SAMPLE* spl); - ALLEGRO_CHANNEL_CONF al_get_sample_channels(in ALLEGRO_SAMPLE* spl); - void* al_get_sample_data(in ALLEGRO_SAMPLE* spl); + uint al_get_sample_frequency(const(ALLEGRO_SAMPLE)* spl); + uint al_get_sample_length(const(ALLEGRO_SAMPLE)* spl); + ALLEGRO_AUDIO_DEPTH al_get_sample_depth(const(ALLEGRO_SAMPLE)* spl); + ALLEGRO_CHANNEL_CONF al_get_sample_channels(const(ALLEGRO_SAMPLE)* spl); + void* al_get_sample_data(const(ALLEGRO_SAMPLE)* spl); - uint al_get_sample_instance_frequency(in ALLEGRO_SAMPLE_INSTANCE* spl); - uint al_get_sample_instance_length(in ALLEGRO_SAMPLE_INSTANCE* spl); - uint al_get_sample_instance_position(in ALLEGRO_SAMPLE_INSTANCE* spl); + uint al_get_sample_instance_frequency(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + uint al_get_sample_instance_length(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + uint al_get_sample_instance_position(const(ALLEGRO_SAMPLE_INSTANCE)* spl); - float al_get_sample_instance_speed(in ALLEGRO_SAMPLE_INSTANCE* spl); - float al_get_sample_instance_gain(in ALLEGRO_SAMPLE_INSTANCE* spl); - float al_get_sample_instance_pan(in ALLEGRO_SAMPLE_INSTANCE* spl); - float al_get_sample_instance_time(in ALLEGRO_SAMPLE_INSTANCE* spl); + float al_get_sample_instance_speed(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + float al_get_sample_instance_gain(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + float al_get_sample_instance_pan(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + float al_get_sample_instance_time(const(ALLEGRO_SAMPLE_INSTANCE)* spl); - ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(in ALLEGRO_SAMPLE_INSTANCE* spl); - ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(in ALLEGRO_SAMPLE_INSTANCE* spl); - ALLEGRO_PLAYMODE al_get_sample_instance_playmode(in ALLEGRO_SAMPLE_INSTANCE* spl); + ALLEGRO_AUDIO_DEPTH al_get_sample_instance_depth(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + ALLEGRO_CHANNEL_CONF al_get_sample_instance_channels(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + ALLEGRO_PLAYMODE al_get_sample_instance_playmode(const(ALLEGRO_SAMPLE_INSTANCE)* spl); - bool al_get_sample_instance_playing(in ALLEGRO_SAMPLE_INSTANCE* spl); - bool al_get_sample_instance_attached(in ALLEGRO_SAMPLE_INSTANCE* spl); + bool al_get_sample_instance_playing(const(ALLEGRO_SAMPLE_INSTANCE)* spl); + bool al_get_sample_instance_attached(const(ALLEGRO_SAMPLE_INSTANCE)* spl); bool al_set_sample_instance_position(ALLEGRO_SAMPLE_INSTANCE* spl, uint val); bool al_set_sample_instance_length(ALLEGRO_SAMPLE_INSTANCE* spl, uint val); @@ -154,24 +154,24 @@ nothrow @nogc extern (C) void al_destroy_audio_stream(ALLEGRO_AUDIO_STREAM* stream); void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM* stream); - uint al_get_audio_stream_frequency(in ALLEGRO_AUDIO_STREAM* stream); - uint al_get_audio_stream_length(in ALLEGRO_AUDIO_STREAM* stream); - uint al_get_audio_stream_fragments(in ALLEGRO_AUDIO_STREAM* stream); - uint al_get_available_audio_stream_fragments(in ALLEGRO_AUDIO_STREAM* stream); + uint al_get_audio_stream_frequency(const(ALLEGRO_AUDIO_STREAM)* stream); + uint al_get_audio_stream_length(const(ALLEGRO_AUDIO_STREAM)* stream); + uint al_get_audio_stream_fragments(const(ALLEGRO_AUDIO_STREAM)* stream); + uint al_get_available_audio_stream_fragments(const(ALLEGRO_AUDIO_STREAM)* stream); - float al_get_audio_stream_speed(in ALLEGRO_AUDIO_STREAM* stream); - float al_get_audio_stream_gain(in ALLEGRO_AUDIO_STREAM* stream); - float al_get_audio_stream_pan(in ALLEGRO_AUDIO_STREAM* stream); + float al_get_audio_stream_speed(const(ALLEGRO_AUDIO_STREAM)* stream); + float al_get_audio_stream_gain(const(ALLEGRO_AUDIO_STREAM)* stream); + float al_get_audio_stream_pan(const(ALLEGRO_AUDIO_STREAM)* stream); - ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(in ALLEGRO_AUDIO_STREAM* stream); - ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(in ALLEGRO_AUDIO_STREAM* stream); - ALLEGRO_PLAYMODE al_get_audio_stream_playmode(in ALLEGRO_AUDIO_STREAM* stream); + ALLEGRO_CHANNEL_CONF al_get_audio_stream_channels(const(ALLEGRO_AUDIO_STREAM)* stream); + ALLEGRO_AUDIO_DEPTH al_get_audio_stream_depth(const(ALLEGRO_AUDIO_STREAM)* stream); + ALLEGRO_PLAYMODE al_get_audio_stream_playmode(const(ALLEGRO_AUDIO_STREAM)* stream); - bool al_get_audio_stream_playing(in ALLEGRO_AUDIO_STREAM* spl); - bool al_get_audio_stream_attached(in ALLEGRO_AUDIO_STREAM* spl); - ulong al_get_audio_stream_played_samples(in ALLEGRO_AUDIO_STREAM* stream); + bool al_get_audio_stream_playing(const(ALLEGRO_AUDIO_STREAM)* spl); + bool al_get_audio_stream_attached(const(ALLEGRO_AUDIO_STREAM)* spl); + ulong al_get_audio_stream_played_samples(const(ALLEGRO_AUDIO_STREAM)* stream); - void* al_get_audio_stream_fragment(in ALLEGRO_AUDIO_STREAM* stream); + void* al_get_audio_stream_fragment(const(ALLEGRO_AUDIO_STREAM)* stream); bool al_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM* stream, float val); bool al_set_audio_stream_gain(ALLEGRO_AUDIO_STREAM* stream, float val); @@ -200,13 +200,13 @@ nothrow @nogc extern (C) bool al_attach_mixer_to_mixer(ALLEGRO_MIXER* stream, ALLEGRO_MIXER* mixer); bool al_set_mixer_postprocess_callback(ALLEGRO_MIXER* mixer, void function(void* buf, uint samples, void* data) cb, void* data); - uint al_get_mixer_frequency(in ALLEGRO_MIXER* mixer); - ALLEGRO_CHANNEL_CONF al_get_mixer_channels(in ALLEGRO_MIXER* mixer); - ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(in ALLEGRO_MIXER* mixer); - ALLEGRO_MIXER_QUALITY al_get_mixer_quality(in ALLEGRO_MIXER* mixer); - float al_get_mixer_gain(in ALLEGRO_MIXER *mixer); - bool al_get_mixer_playing(in ALLEGRO_MIXER* mixer); - bool al_get_mixer_attached(in ALLEGRO_MIXER* mixer); + uint al_get_mixer_frequency(const(ALLEGRO_MIXER)* mixer); + ALLEGRO_CHANNEL_CONF al_get_mixer_channels(const(ALLEGRO_MIXER)* mixer); + ALLEGRO_AUDIO_DEPTH al_get_mixer_depth(const(ALLEGRO_MIXER)* mixer); + ALLEGRO_MIXER_QUALITY al_get_mixer_quality(const(ALLEGRO_MIXER)* mixer); + float al_get_mixer_gain(const(ALLEGRO_MIXER)* mixer); + bool al_get_mixer_playing(const(ALLEGRO_MIXER)* mixer); + bool al_get_mixer_attached(const(ALLEGRO_MIXER)* mixer); bool al_set_mixer_frequency(ALLEGRO_MIXER* mixer, uint val); bool al_set_mixer_quality(ALLEGRO_MIXER* mixer, ALLEGRO_MIXER_QUALITY val); bool al_set_mixer_gain(ALLEGRO_MIXER *mixer, float gain); @@ -224,11 +224,11 @@ nothrow @nogc extern (C) ALLEGRO_VOICE* voice); void al_detach_voice(ALLEGRO_VOICE* voice); - uint al_get_voice_frequency(in ALLEGRO_VOICE* voice); - uint al_get_voice_position(in ALLEGRO_VOICE* voice); - ALLEGRO_CHANNEL_CONF al_get_voice_channels(in ALLEGRO_VOICE* voice); - ALLEGRO_AUDIO_DEPTH al_get_voice_depth(in ALLEGRO_VOICE* voice); - bool al_get_voice_playing(in ALLEGRO_VOICE* voice); + uint al_get_voice_frequency(const(ALLEGRO_VOICE)* voice); + uint al_get_voice_position(const(ALLEGRO_VOICE)* voice); + ALLEGRO_CHANNEL_CONF al_get_voice_channels(const(ALLEGRO_VOICE)* voice); + ALLEGRO_AUDIO_DEPTH al_get_voice_depth(const(ALLEGRO_VOICE)* voice); + bool al_get_voice_playing(const(ALLEGRO_VOICE)* voice); bool al_set_voice_position(ALLEGRO_VOICE* voice, uint val); bool al_set_voice_playing(ALLEGRO_VOICE* voice, bool val); @@ -255,21 +255,21 @@ nothrow @nogc extern (C) void al_set_default_voice(ALLEGRO_VOICE* voice); /* File type handlers */ - bool al_register_sample_loader(in char* ext, ALLEGRO_SAMPLE* function(in char* filename) loader); - bool al_register_sample_saver(in char* ext, bool function(in char* filename, ALLEGRO_SAMPLE* spl) saver); - bool al_register_audio_stream_loader(in char* ext, ALLEGRO_AUDIO_STREAM* function(in char* filename, size_t buffer_count, uint samples) stream_loader); + bool al_register_sample_loader(const(char)* ext, ALLEGRO_SAMPLE* function(const(char)* filename) loader); + bool al_register_sample_saver(const(char)* ext, bool function(const(char)* filename, ALLEGRO_SAMPLE* spl) saver); + bool al_register_audio_stream_loader(const(char)* ext, ALLEGRO_AUDIO_STREAM* function(const(char)* filename, size_t buffer_count, uint samples) stream_loader); - bool al_register_sample_loader_f(in char* ext, ALLEGRO_SAMPLE* function(ALLEGRO_FILE* fp) loader); - bool al_register_sample_saver_f(in char* ext, bool function(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE* spl) saver); - bool al_register_audio_stream_loader_f(in char* ext, ALLEGRO_AUDIO_STREAM* function(ALLEGRO_FILE* fp, size_t buffer_count, uint samples) stream_loader); + bool al_register_sample_loader_f(const(char)* ext, ALLEGRO_SAMPLE* function(ALLEGRO_FILE* fp) loader); + bool al_register_sample_saver_f(const(char)* ext, bool function(ALLEGRO_FILE* fp, ALLEGRO_SAMPLE* spl) saver); + bool al_register_audio_stream_loader_f(const(char)* ext, ALLEGRO_AUDIO_STREAM* function(ALLEGRO_FILE* fp, size_t buffer_count, uint samples) stream_loader); - ALLEGRO_SAMPLE* al_load_sample(in char* filename); - bool al_save_sample(in char* filename, ALLEGRO_SAMPLE* spl); - ALLEGRO_AUDIO_STREAM* al_load_audio_stream(in char* filename, size_t buffer_count, uint samples); + ALLEGRO_SAMPLE* al_load_sample(const(char)* filename); + bool al_save_sample(const(char)* filename, ALLEGRO_SAMPLE* spl); + ALLEGRO_AUDIO_STREAM* al_load_audio_stream(const(char)* filename, size_t buffer_count, uint samples); - ALLEGRO_SAMPLE* al_load_sample_f(ALLEGRO_FILE* fp, in char* ident); - bool al_save_sample_f(ALLEGRO_FILE* fp, in char* ident, ALLEGRO_SAMPLE* spl); - ALLEGRO_AUDIO_STREAM * al_load_audio_stream_f(ALLEGRO_FILE* fp, in char* ident, size_t buffer_count, uint samples); + ALLEGRO_SAMPLE* al_load_sample_f(ALLEGRO_FILE* fp, const(char)* ident); + bool al_save_sample_f(ALLEGRO_FILE* fp, const(char)* ident, ALLEGRO_SAMPLE* spl); + ALLEGRO_AUDIO_STREAM * al_load_audio_stream_f(ALLEGRO_FILE* fp, const(char)* ident, size_t buffer_count, uint samples); /* Recording functions */ version (AllegroAudioUnstable) diff --git a/allegro5/allegro_color.d b/allegro5/allegro_color.d index 0d32358..1cdb240 100644 --- a/allegro5/allegro_color.d +++ b/allegro5/allegro_color.d @@ -17,14 +17,14 @@ nothrow @nogc extern (C) void al_color_rgb_to_hsl(float red, float green, float blue, float* hue, float* saturation, float* lightness); void al_color_rgb_to_hsv(float red, float green, float blue, float* hue, float* saturation, float* value); void al_color_hsl_to_rgb(float hue, float saturation, float lightness, float* red, float* green, float* blue); - int al_color_name_to_rgb(in char* name, float* r, float* g, float* b); + int al_color_name_to_rgb(const(char)* name, float* r, float* g, float* b); const(char)* al_color_rgb_to_name(float r, float g, float b); void al_color_cmyk_to_rgb(float cyan, float magenta, float yellow, float key, float* red, float* green, float* blue); void al_color_rgb_to_cmyk(float red, float green, float blue, float* cyan, float* magenta, float* yellow, float* key); void al_color_yuv_to_rgb(float y, float u, float v, float* red, float* green, float* blue); void al_color_rgb_to_yuv(float red, float green, float blue, float* y, float* u, float* v); void al_color_rgb_to_html(float red, float green, float blue, char* string); - void al_color_html_to_rgb(in char* string, float* red, float* green, float* blue); + void al_color_html_to_rgb(const(char)* string, float* red, float* green, float* blue); } static import allegro5.allegro_color_ret; @@ -33,6 +33,6 @@ mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_yuv", "float y, flo mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_cmyk", "float c, float m, float y, float k", "c, m, y, k")); mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_hsl", "float h, float s, float l", "h, s, l")); mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_hsv", "float h, float s, float v", "h, s, v")); -mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_name", "in char* name", "name")); -mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_html", "in char* string", "string")); +mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_name", "const(char)* name", "name")); +mixin(ColorWrapper!("allegro5.allegro_color_ret.", "al_color_html", "const(char)* string", "string")); diff --git a/allegro5/allegro_color_ret.d b/allegro5/allegro_color_ret.d index ce53ece..d231d8e 100644 --- a/allegro5/allegro_color_ret.d +++ b/allegro5/allegro_color_ret.d @@ -8,6 +8,6 @@ nothrow @nogc extern(C) ALLEGRO_COLOR al_color_cmyk(float c, float m, float y, float k); ALLEGRO_COLOR al_color_hsl(float h, float s, float l); ALLEGRO_COLOR al_color_hsv(float h, float s, float v); - ALLEGRO_COLOR al_color_name(in char* name); - ALLEGRO_COLOR al_color_html(in char* string); + ALLEGRO_COLOR al_color_name(const(char)* name); + ALLEGRO_COLOR al_color_html(const(char)* string); } diff --git a/allegro5/allegro_font.d b/allegro5/allegro_font.d index 3d7c8c9..db03bb9 100644 --- a/allegro5/allegro_font.d +++ b/allegro5/allegro_font.d @@ -20,14 +20,14 @@ nothrow @nogc extern (C) struct ALLEGRO_FONT_VTABLE { - int function(in ALLEGRO_FONT* f) font_height; - int function(in ALLEGRO_FONT* f, int ch) char_length; - int function(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text) text_length; - int function(in ALLEGRO_FONT* f, int ch, int x, int y) render_char; - int function(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text, int x, int y) render; + int function(const(ALLEGRO_FONT)* f) font_height; + int function(const(ALLEGRO_FONT)* f, int ch) char_length; + int function(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text) text_length; + int function(const(ALLEGRO_FONT)* f, int ch, int x, int y) render_char; + int function(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text, int x, int y) render; void function(ALLEGRO_FONT* f) destroy; - void function(in ALLEGRO_FONT* f, - in ALLEGRO_USTR* text, int* bbx, int* bby, int* bbw, + void function(const(ALLEGRO_FONT)* f, + const(ALLEGRO_USTR)* text, int* bbx, int* bby, int* bbw, int* bbh, int* ascent, int* descent) get_text_dimensions; int function (ALLEGRO_FONT* font, int ranges_count, int* ranges) get_font_ranges; bool function(const ALLEGRO_FONT *f, int codepoint, int *bbx, int *bby, int *bbw, int *bbh) get_glyph_dimensions; @@ -44,28 +44,28 @@ nothrow @nogc extern (C) ALLEGRO_ALIGN_INTEGER = 4, } - bool al_register_font_loader(in char* ext, ALLEGRO_FONT* function(in char* filename, int size, int flags) load); - ALLEGRO_FONT* al_load_bitmap_font(in char* filename); - ALLEGRO_FONT* al_load_bitmap_font_flags(in char* filename, int flags); - ALLEGRO_FONT* al_load_font(in char* filename, int size, int flags); + bool al_register_font_loader(const(char)* ext, ALLEGRO_FONT* function(const(char)* filename, int size, int flags) load); + ALLEGRO_FONT* al_load_bitmap_font(const(char)* filename); + ALLEGRO_FONT* al_load_bitmap_font_flags(const(char)* filename, int flags); + ALLEGRO_FONT* al_load_font(const(char)* filename, int size, int flags); - ALLEGRO_FONT* al_grab_font_from_bitmap(ALLEGRO_BITMAP* bmp, int n, in int* ranges); + ALLEGRO_FONT* al_grab_font_from_bitmap(ALLEGRO_BITMAP* bmp, int n, const(int)* ranges); ALLEGRO_FONT* al_create_builtin_font(); - void al_draw_ustr(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in ALLEGRO_USTR* ustr); - void al_draw_text(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in char* text); - void al_draw_justified_text(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in char* text); - void al_draw_justified_ustr(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in ALLEGRO_USTR* text); - void al_draw_textf(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x, float y, int flags, in char* format, ...); - void al_draw_justified_textf(in ALLEGRO_FONT* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, in char* format, ...); - int al_get_text_width(in ALLEGRO_FONT* f, in char* str); - int al_get_ustr_width(in ALLEGRO_FONT* f, in ALLEGRO_USTR* ustr); - int al_get_font_line_height(in ALLEGRO_FONT* f); - int al_get_font_ascent(in ALLEGRO_FONT* f); - int al_get_font_descent(in ALLEGRO_FONT* f); + void al_draw_ustr(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(ALLEGRO_USTR)* ustr); + void al_draw_text(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(char)* text); + void al_draw_justified_text(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(char)* text); + void al_draw_justified_ustr(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(ALLEGRO_USTR)* text); + void al_draw_textf(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x, float y, int flags, const(char)* format, ...); + void al_draw_justified_textf(const(ALLEGRO_FONT)* font, ALLEGRO_COLOR color, float x1, float x2, float y, float diff, int flags, const(char)* format, ...); + int al_get_text_width(const(ALLEGRO_FONT)* f, const(char)* str); + int al_get_ustr_width(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* ustr); + int al_get_font_line_height(const(ALLEGRO_FONT)* f); + int al_get_font_ascent(const(ALLEGRO_FONT)* f); + int al_get_font_descent(const(ALLEGRO_FONT)* f); void al_destroy_font(ALLEGRO_FONT* f); - void al_get_ustr_dimensions(in ALLEGRO_FONT* f, in ALLEGRO_USTR* text, int* bbx, int* bby, int* bbw, int* bbh); - void al_get_text_dimensions(in ALLEGRO_FONT* f, in char* text, int* bbx, int* bby, int* bbw, int* bbh); + void al_get_ustr_dimensions(const(ALLEGRO_FONT)* f, const(ALLEGRO_USTR)* text, int* bbx, int* bby, int* bbw, int* bbh); + void al_get_text_dimensions(const(ALLEGRO_FONT)* f, const(char)* text, int* bbx, int* bby, int* bbw, int* bbh); bool al_init_font_addon(); void al_shutdown_font_addon(); uint al_get_allegro_font_version(); diff --git a/allegro5/allegro_memfile.d b/allegro5/allegro_memfile.d index 90958fa..34dedfa 100644 --- a/allegro5/allegro_memfile.d +++ b/allegro5/allegro_memfile.d @@ -10,6 +10,6 @@ import allegro5.allegro; nothrow @nogc extern (C) { - ALLEGRO_FILE* al_open_memfile(void* mem, long size, in char* mode); + ALLEGRO_FILE* al_open_memfile(void* mem, long size, const(char)* mode); uint al_get_allegro_memfile_version(); } diff --git a/allegro5/allegro_native_dialog.d b/allegro5/allegro_native_dialog.d index 89ba76a..d22aaa6 100644 --- a/allegro5/allegro_native_dialog.d +++ b/allegro5/allegro_native_dialog.d @@ -49,25 +49,25 @@ nothrow @nogc extern (C) bool al_init_native_dialog_addon(); void al_shutdown_native_dialog_addon(); - ALLEGRO_FILECHOOSER* al_create_native_file_dialog(in ALLEGRO_PATH* initial_path, in char* title, in char* patterns, int mode); + ALLEGRO_FILECHOOSER* al_create_native_file_dialog(const(ALLEGRO_PATH)* initial_path, const(char)* title, const(char)* patterns, int mode); void al_show_native_file_dialog(ALLEGRO_DISPLAY* display, ALLEGRO_FILECHOOSER* dialog); - int al_get_native_file_dialog_count(in ALLEGRO_FILECHOOSER* dialog); - ALLEGRO_PATH* al_get_native_file_dialog_path(in ALLEGRO_FILECHOOSER* dialog, size_t index); + int al_get_native_file_dialog_count(const(ALLEGRO_FILECHOOSER)* dialog); + ALLEGRO_PATH* al_get_native_file_dialog_path(const(ALLEGRO_FILECHOOSER)* dialog, size_t index); void al_destroy_native_file_dialog(ALLEGRO_FILECHOOSER* dialog); - int al_show_native_message_box(ALLEGRO_DISPLAY* display, in char* title, in char* heading, in char* text, in char* buttons, int flags); + int al_show_native_message_box(ALLEGRO_DISPLAY* display, const(char)* title, const(char)* heading, const(char)* text, const(char)* buttons, int flags); - ALLEGRO_TEXTLOG* al_open_native_text_log(in char* title, int flags); + ALLEGRO_TEXTLOG* al_open_native_text_log(const(char)* title, int flags); void al_close_native_text_log(ALLEGRO_TEXTLOG* textlog); - void al_append_native_text_log(ALLEGRO_TEXTLOG* textlog, in char* format, ...); + void al_append_native_text_log(ALLEGRO_TEXTLOG* textlog, const(char)* format, ...); ALLEGRO_EVENT_SOURCE* al_get_native_text_log_event_source(ALLEGRO_TEXTLOG* textlog); /* creating/modifying menus */ ALLEGRO_MENU* al_create_menu();; ALLEGRO_MENU* al_create_popup_menu();; ALLEGRO_MENU* al_build_menu(ALLEGRO_MENU_INFO* info); - int al_append_menu_item(ALLEGRO_MENU* parent, in char* title, ushort id, int flags, ALLEGRO_BITMAP* icon, ALLEGRO_MENU* submenu); - int al_insert_menu_item(ALLEGRO_MENU* parent, int pos, in char* title, ushort id, int flags, ALLEGRO_BITMAP* icon, ALLEGRO_MENU* submenu); + int al_append_menu_item(ALLEGRO_MENU* parent, const(char)* title, ushort id, int flags, ALLEGRO_BITMAP* icon, ALLEGRO_MENU* submenu); + int al_insert_menu_item(ALLEGRO_MENU* parent, int pos, const(char)* title, ushort id, int flags, ALLEGRO_BITMAP* icon, ALLEGRO_MENU* submenu); bool al_remove_menu_item(ALLEGRO_MENU* menu, int pos); ALLEGRO_MENU* al_clone_menu(ALLEGRO_MENU* menu); ALLEGRO_MENU* al_clone_menu_for_popup(ALLEGRO_MENU* menu); @@ -75,7 +75,7 @@ nothrow @nogc extern (C) /* properties */ const(char)* al_get_menu_item_caption(ALLEGRO_MENU* menu, int pos); - void al_set_menu_item_caption(ALLEGRO_MENU* menu, int pos, in char* caption); + void al_set_menu_item_caption(ALLEGRO_MENU* menu, int pos, const(char)* caption); int al_get_menu_item_flags(ALLEGRO_MENU* menu, int pos); void al_set_menu_item_flags(ALLEGRO_MENU* menu, int pos, int flags); version (AllegroNativeDialogUnstable) diff --git a/allegro5/allegro_primitives.d b/allegro5/allegro_primitives.d index 6ba62b7..6eb61d6 100644 --- a/allegro5/allegro_primitives.d +++ b/allegro5/allegro_primitives.d @@ -119,18 +119,18 @@ nothrow @nogc extern (C) */ bool al_init_primitives_addon(); void al_shutdown_primitives_addon(); - int al_draw_prim(in void* vtxs, in ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, int start, int end, int type); - int al_draw_indexed_prim(in void* vtxs, in ALLEGRO_VERTEX_DECL* decl, ALLEGRO_BITMAP* texture, in int* indices, int num_vtx, int type); + int al_draw_prim(const(void)* vtxs, const(ALLEGRO_VERTEX_DECL)* decl, ALLEGRO_BITMAP* texture, int start, int end, int type); + int al_draw_indexed_prim(const(void)* vtxs, const(ALLEGRO_VERTEX_DECL)* decl, ALLEGRO_BITMAP* texture, const(int)* indices, int num_vtx, int type); int al_draw_vertex_buffer(ALLEGRO_VERTEX_BUFFER* vertex_buffer, ALLEGRO_BITMAP* texture, int start, int end, int type); int al_draw_indexed_buffer(ALLEGRO_VERTEX_BUFFER* vertex_buffer, ALLEGRO_BITMAP* texture, ALLEGRO_INDEX_BUFFER* index_buffer, int start, int end, int type); - ALLEGRO_VERTEX_DECL* al_create_vertex_decl(in ALLEGRO_VERTEX_ELEMENT* elements, int stride); + ALLEGRO_VERTEX_DECL* al_create_vertex_decl(const(ALLEGRO_VERTEX_ELEMENT)* elements, int stride); void al_destroy_vertex_decl(ALLEGRO_VERTEX_DECL* decl); /* * Vertex buffers */ - ALLEGRO_VERTEX_BUFFER* al_create_vertex_buffer(ALLEGRO_VERTEX_DECL* decl, in void* initial_data, int num_vertices, int flags); + ALLEGRO_VERTEX_BUFFER* al_create_vertex_buffer(ALLEGRO_VERTEX_DECL* decl, const(void)* initial_data, int num_vertices, int flags); void al_destroy_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer); void* al_lock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer, int offset, int length, int flags); void al_unlock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer); @@ -139,7 +139,7 @@ nothrow @nogc extern (C) /* * Index buffers */ - ALLEGRO_INDEX_BUFFER* al_create_index_buffer(int index_size, in void* initial_data, int num_indices, int flags); + ALLEGRO_INDEX_BUFFER* al_create_index_buffer(int index_size, const(void)* initial_data, int num_indices, int flags); void al_destroy_index_buffer(ALLEGRO_INDEX_BUFFER* buffer); void* al_lock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer, int offset, int length, int flags); void al_unlock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer); @@ -148,7 +148,7 @@ nothrow @nogc extern (C) /* * Utilities for high level primitives. */ - bool al_triangulate_polygon(in float* vertices, size_t vertex_stride, in int* vertex_counts, void function(int, int, int, void*) emit_triangle, void* userdata); + bool al_triangulate_polygon(const(float)* vertices, size_t vertex_stride, const(int)* vertex_counts, void function(int, int, int, void*) emit_triangle, void* userdata); /* * Custom primitives @@ -181,8 +181,8 @@ nothrow @nogc extern (C) void al_calculate_spline(float* dest, int stride, float[8] points, float thickness, int num_segments); void al_draw_spline(float[8] points, ALLEGRO_COLOR color, float thickness); - void al_calculate_ribbon(float* dest, int dest_stride, in float *points, int points_stride, float thickness, int num_segments); - void al_draw_ribbon(in float *points, int points_stride, ALLEGRO_COLOR color, float thickness, int num_segments); + void al_calculate_ribbon(float* dest, int dest_stride, const(float)* points, int points_stride, float thickness, int num_segments); + void al_draw_ribbon(const(float)* points, int points_stride, ALLEGRO_COLOR color, float thickness, int num_segments); void al_draw_filled_triangle(float x1, float y1, float x2, float y2, float x3, float y3, ALLEGRO_COLOR color); void al_draw_filled_rectangle(float x1, float y1, float x2, float y2, ALLEGRO_COLOR color); @@ -191,9 +191,9 @@ nothrow @nogc extern (C) void al_draw_filled_pieslice(float cx, float cy, float r, float start_theta, float delta_theta, ALLEGRO_COLOR color); void al_draw_filled_rounded_rectangle(float x1, float y1, float x2, float y2, float rx, float ry, ALLEGRO_COLOR color); - void al_draw_polyline(in float* vertices, int vertex_stride, int vertex_count, ALLEGRO_LINE_JOIN join_style, ALLEGRO_LINE_CAP cap_style, ALLEGRO_COLOR color, float thickness, float miter_limit); + void al_draw_polyline(const(float)* vertices, int vertex_stride, int vertex_count, ALLEGRO_LINE_JOIN join_style, ALLEGRO_LINE_CAP cap_style, ALLEGRO_COLOR color, float thickness, float miter_limit); - void al_draw_polygon(in float* vertices, int vertex_count, ALLEGRO_LINE_JOIN join_style, ALLEGRO_COLOR color, float thickness, float miter_limit); - void al_draw_filled_polygon(in float* vertices, int vertex_count, ALLEGRO_COLOR color); - void al_draw_filled_polygon_with_holes(in float* vertices, in int* vertex_counts, ALLEGRO_COLOR color); + void al_draw_polygon(const(float)* vertices, int vertex_count, ALLEGRO_LINE_JOIN join_style, ALLEGRO_COLOR color, float thickness, float miter_limit); + void al_draw_filled_polygon(const(float)* vertices, int vertex_count, ALLEGRO_COLOR color); + void al_draw_filled_polygon_with_holes(const(float)* vertices, const(int)* vertex_counts, ALLEGRO_COLOR color); } diff --git a/allegro5/allegro_ttf.d b/allegro5/allegro_ttf.d index b81e592..3c79d2b 100644 --- a/allegro5/allegro_ttf.d +++ b/allegro5/allegro_ttf.d @@ -18,10 +18,10 @@ nothrow @nogc extern (C) ALLEGRO_TTF_NO_AUTOHINT = 4 } - ALLEGRO_FONT* al_load_ttf_font(in char* filename, int size, int flags); - ALLEGRO_FONT* al_load_ttf_font_f(ALLEGRO_FILE* file, in char* filename, int size, int flags); - ALLEGRO_FONT* al_load_ttf_font_stretch(in char* filename, int w, int h, int flags); - ALLEGRO_FONT* al_load_ttf_font_stretch_f(ALLEGRO_FILE *file, in char* filename, int w, int h, int flags); + ALLEGRO_FONT* al_load_ttf_font(const(char)* filename, int size, int flags); + ALLEGRO_FONT* al_load_ttf_font_f(ALLEGRO_FILE* file, const(char)* filename, int size, int flags); + ALLEGRO_FONT* al_load_ttf_font_stretch(const(char)* filename, int w, int h, int flags); + ALLEGRO_FONT* al_load_ttf_font_stretch_f(ALLEGRO_FILE *file, const(char)* filename, int w, int h, int flags); bool al_init_ttf_addon(); void al_shutdown_ttf_addon(); diff --git a/allegro5/allegro_video.d b/allegro5/allegro_video.d index f2bf03b..67728af 100644 --- a/allegro5/allegro_video.d +++ b/allegro5/allegro_video.d @@ -26,7 +26,7 @@ nothrow @nogc extern (C) ALLEGRO_VIDEO_POSITION_AUDIO_DECODE = 2 } - ALLEGRO_VIDEO* al_open_video(in char* filename); + ALLEGRO_VIDEO* al_open_video(const(char)* filename); void al_close_video(ALLEGRO_VIDEO* video); void al_start_video(ALLEGRO_VIDEO* video, ALLEGRO_MIXER* mixer); void al_start_video_with_voice(ALLEGRO_VIDEO* video, ALLEGRO_VOICE* voice); diff --git a/allegro5/bitmap_io.d b/allegro5/bitmap_io.d index 2d707db..befeaec 100644 --- a/allegro5/bitmap_io.d +++ b/allegro5/bitmap_io.d @@ -15,24 +15,24 @@ nothrow @nogc extern(C) ALLEGRO_KEEP_INDEX = 0x0800 } - alias ALLEGRO_BITMAP* function(in char* filename) ALLEGRO_IIO_LOADER_FUNCTION; + alias ALLEGRO_BITMAP* function(const(char)* filename) ALLEGRO_IIO_LOADER_FUNCTION; alias ALLEGRO_BITMAP* function(ALLEGRO_FILE* fp) ALLEGRO_IIO_FS_LOADER_FUNCTION; - alias bool function(in char* filename, ALLEGRO_BITMAP* bitmap) ALLEGRO_IIO_SAVER_FUNCTION; + alias bool function(const(char)* filename, ALLEGRO_BITMAP* bitmap) ALLEGRO_IIO_SAVER_FUNCTION; alias bool function(ALLEGRO_FILE* fp, ALLEGRO_BITMAP* bitmap) ALLEGRO_IIO_FS_SAVER_FUNCTION; alias bool function(ALLEGRO_FILE *f) ALLEGRO_IIO_IDENTIFIER_FUNCTION; - bool al_register_bitmap_loader(in char* ext, ALLEGRO_IIO_LOADER_FUNCTION loader); - bool al_register_bitmap_saver(in char* ext, ALLEGRO_IIO_SAVER_FUNCTION saver); - bool al_register_bitmap_loader_f(in char* ext, ALLEGRO_IIO_FS_LOADER_FUNCTION fs_loader); - bool al_register_bitmap_saver_f(in char* ext, ALLEGRO_IIO_FS_SAVER_FUNCTION fs_saver); + bool al_register_bitmap_loader(const(char)* ext, ALLEGRO_IIO_LOADER_FUNCTION loader); + bool al_register_bitmap_saver(const(char)* ext, ALLEGRO_IIO_SAVER_FUNCTION saver); + bool al_register_bitmap_loader_f(const(char)* ext, ALLEGRO_IIO_FS_LOADER_FUNCTION fs_loader); + bool al_register_bitmap_saver_f(const(char)* ext, ALLEGRO_IIO_FS_SAVER_FUNCTION fs_saver); bool al_register_bitmap_identifier(const char *ext, ALLEGRO_IIO_IDENTIFIER_FUNCTION identifier); - ALLEGRO_BITMAP* al_load_bitmap(in char* filename); - ALLEGRO_BITMAP* al_load_bitmap_flags(in char* filename, int flags); - ALLEGRO_BITMAP* al_load_bitmap_f(ALLEGRO_FILE* fp, in char* ident); - ALLEGRO_BITMAP* al_load_bitmap_flags_f(ALLEGRO_FILE* fp, in char* ident, int flags); - bool al_save_bitmap(in char* filename, ALLEGRO_BITMAP* bitmap); - bool al_save_bitmap_f(ALLEGRO_FILE* fp, in char* ident, ALLEGRO_BITMAP* bitmap); + ALLEGRO_BITMAP* al_load_bitmap(const(char)* filename); + ALLEGRO_BITMAP* al_load_bitmap_flags(const(char)* filename, int flags); + ALLEGRO_BITMAP* al_load_bitmap_f(ALLEGRO_FILE* fp, const(char)* ident); + ALLEGRO_BITMAP* al_load_bitmap_flags_f(ALLEGRO_FILE* fp, const(char)* ident, int flags); + bool al_save_bitmap(const(char)* filename, ALLEGRO_BITMAP* bitmap); + bool al_save_bitmap_f(ALLEGRO_FILE* fp, const(char)* ident, ALLEGRO_BITMAP* bitmap); const(char)* al_identify_bitmap_f(ALLEGRO_FILE *fp); const(char)* al_identify_bitmap(const(char)* filename); } diff --git a/allegro5/config.d b/allegro5/config.d index 0e2325c..66c6272 100644 --- a/allegro5/config.d +++ b/allegro5/config.d @@ -10,22 +10,22 @@ nothrow @nogc extern (C) struct ALLEGRO_CONFIG_ENTRY {}; ALLEGRO_CONFIG* al_create_config(); - void al_add_config_section(ALLEGRO_CONFIG* config, in char* name); - void al_set_config_value(ALLEGRO_CONFIG* config, in char* section, in char* key, in char* value); - void al_add_config_comment(ALLEGRO_CONFIG* config, in char* section, in char* comment); - const(char)* al_get_config_value(in ALLEGRO_CONFIG* config, in char* section, in char* key); - ALLEGRO_CONFIG* al_load_config_file(in char* filename); + void al_add_config_section(ALLEGRO_CONFIG* config, const(char)* name); + void al_set_config_value(ALLEGRO_CONFIG* config, const(char)* section, const(char)* key, const(char)* value); + void al_add_config_comment(ALLEGRO_CONFIG* config, const(char)* section, const(char)* comment); + const(char)* al_get_config_value(const(ALLEGRO_CONFIG)* config, const(char)* section, const(char)* key); + ALLEGRO_CONFIG* al_load_config_file(const(char)* filename); ALLEGRO_CONFIG* al_load_config_file_f(ALLEGRO_FILE* filename); - bool al_save_config_file(in char* filename, in ALLEGRO_CONFIG* config); - bool al_save_config_file_f(ALLEGRO_FILE* file, in ALLEGRO_CONFIG* config); - void al_merge_config_into(ALLEGRO_CONFIG* master, in ALLEGRO_CONFIG* add); - ALLEGRO_CONFIG* al_merge_config(in ALLEGRO_CONFIG* cfg1, in ALLEGRO_CONFIG* cfg2); + bool al_save_config_file(const(char)* filename, const(ALLEGRO_CONFIG)* config); + bool al_save_config_file_f(ALLEGRO_FILE* file, const(ALLEGRO_CONFIG)* config); + void al_merge_config_into(ALLEGRO_CONFIG* master, const(ALLEGRO_CONFIG)* add); + ALLEGRO_CONFIG* al_merge_config(const(ALLEGRO_CONFIG)* cfg1, const(ALLEGRO_CONFIG)* cfg2); void al_destroy_config(ALLEGRO_CONFIG* config); - bool al_remove_config_section(ALLEGRO_CONFIG* config, in char* section); - bool al_remove_config_key(ALLEGRO_CONFIG* config, in char* section, in char* key); + bool al_remove_config_section(ALLEGRO_CONFIG* config, const(char)* section); + bool al_remove_config_key(ALLEGRO_CONFIG* config, const(char)* section, const(char)* key); - const(char)* al_get_first_config_section(in ALLEGRO_CONFIG* config, ALLEGRO_CONFIG_SECTION** iterator); + const(char)* al_get_first_config_section(const(ALLEGRO_CONFIG)* config, ALLEGRO_CONFIG_SECTION** iterator); const(char)* al_get_next_config_section(ALLEGRO_CONFIG_SECTION** iterator); - const(char)* al_get_first_config_entry(in ALLEGRO_CONFIG* config, in char* section, ALLEGRO_CONFIG_ENTRY** iterator); + const(char)* al_get_first_config_entry(const(ALLEGRO_CONFIG)* config, const(char)* section, ALLEGRO_CONFIG_ENTRY** iterator); const(char)* al_get_next_config_entry(ALLEGRO_CONFIG_ENTRY** iterator); } diff --git a/allegro5/display.d b/allegro5/display.d index abfa20b..1ed6e50 100644 --- a/allegro5/display.d +++ b/allegro5/display.d @@ -144,7 +144,7 @@ nothrow @nogc extern (C) bool al_set_window_constraints(ALLEGRO_DISPLAY* display, int min_w, int min_h, int max_w, int max_h); bool al_get_window_constraints(ALLEGRO_DISPLAY* display, int* min_w, int* min_h, int* max_w, int* max_h); - void al_set_window_title(ALLEGRO_DISPLAY* display, in char* title); + void al_set_window_title(ALLEGRO_DISPLAY* display, const(char)* title); /* Defined in display_settings.c */ void al_set_new_display_option(int option, int value, int importance); diff --git a/allegro5/events.d b/allegro5/events.d index b5f7e49..ece31cc 100644 --- a/allegro5/events.d +++ b/allegro5/events.d @@ -188,7 +188,7 @@ nothrow @nogc extern (C) bool al_emit_user_event(ALLEGRO_EVENT_SOURCE *, ALLEGRO_EVENT *, void function(ALLEGRO_USER_EVENT *) dtor); void al_unref_user_event(ALLEGRO_USER_EVENT *); void al_set_event_source_data(ALLEGRO_EVENT_SOURCE*, intptr_t data); - intptr_t al_get_event_source_data(in ALLEGRO_EVENT_SOURCE*); + intptr_t al_get_event_source_data(const(ALLEGRO_EVENT_SOURCE)*); /* Event queues */ @@ -200,7 +200,7 @@ nothrow @nogc extern (C) void al_register_event_source(ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT_SOURCE*); void al_unregister_event_source(ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT_SOURCE*); void al_pause_event_queue(ALLEGRO_EVENT_QUEUE*, bool); - bool al_is_event_queue_paused(in ALLEGRO_EVENT_QUEUE*); + bool al_is_event_queue_paused(const(ALLEGRO_EVENT_QUEUE)*); bool al_is_event_queue_empty(ALLEGRO_EVENT_QUEUE*); bool al_get_next_event(ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT* ret_event); bool al_peek_next_event(ALLEGRO_EVENT_QUEUE*, ALLEGRO_EVENT* ret_event); diff --git a/allegro5/file.d b/allegro5/file.d index bbf7157..82c6777 100644 --- a/allegro5/file.d +++ b/allegro5/file.d @@ -19,10 +19,10 @@ nothrow @nogc extern (C) { struct ALLEGRO_FILE_INTERFACE { - void* function(in char* path, in char* mode) fi_fopen; + void* function(const(char)* path, const(char)* mode) fi_fopen; bool function(ALLEGRO_FILE* handle) fi_fclose; size_t function(ALLEGRO_FILE* f, void* ptr, size_t size) fi_fread; - size_t function(ALLEGRO_FILE* f, in void* ptr, size_t size) fi_fwrite; + size_t function(ALLEGRO_FILE* f, const(void)* ptr, size_t size) fi_fwrite; bool function(ALLEGRO_FILE* f) fi_fflush; long function(ALLEGRO_FILE* f) fi_ftell; bool function(ALLEGRO_FILE* f, long offset, int whence) fi_fseek; @@ -47,12 +47,12 @@ nothrow @nogc extern (C) /* The basic operations. */ - ALLEGRO_FILE* al_fopen(in char* path, in char* mode); - ALLEGRO_FILE* al_fopen_interface(in ALLEGRO_FILE_INTERFACE* vt, in char* path, in char* mode); - ALLEGRO_FILE* al_create_file_handle(in ALLEGRO_FILE_INTERFACE* vt, void* userdata); + ALLEGRO_FILE* al_fopen(const(char)* path, const(char)* mode); + ALLEGRO_FILE* al_fopen_interface(const(ALLEGRO_FILE_INTERFACE)* vt, const(char)* path, const(char)* mode); + ALLEGRO_FILE* al_create_file_handle(const(ALLEGRO_FILE_INTERFACE)* vt, void* userdata); bool al_fclose(ALLEGRO_FILE* f); size_t al_fread(ALLEGRO_FILE* f, void* ptr, size_t size); - size_t al_fwrite(ALLEGRO_FILE* f, in void* ptr, size_t size); + size_t al_fwrite(ALLEGRO_FILE* f, const(void)* ptr, size_t size); bool al_fflush(ALLEGRO_FILE* f); long al_ftell(ALLEGRO_FILE* f); bool al_fseek(ALLEGRO_FILE* f, long offset, int whence); @@ -74,22 +74,22 @@ nothrow @nogc extern (C) int al_fread32be(ALLEGRO_FILE* f); size_t al_fwrite32le(ALLEGRO_FILE* f, int l); size_t al_fwrite32be(ALLEGRO_FILE* f, int l); - char* al_fgets(ALLEGRO_FILE* f, in char* p, size_t max); + char* al_fgets(ALLEGRO_FILE* f, const(char)* p, size_t max); ALLEGRO_USTR* al_fget_ustr(ALLEGRO_FILE* f); - int al_fputs(ALLEGRO_FILE* f, in char* p); + int al_fputs(ALLEGRO_FILE* f, const(char)* p); int al_fprintf(ALLEGRO_FILE *f, const char *format, ...); int al_vfprintf(ALLEGRO_FILE *f, const char* format, va_list args); /* Specific to stdio backend. */ - ALLEGRO_FILE* al_fopen_fd(int fd, in char* mode); - ALLEGRO_FILE* al_make_temp_file(in char* tmpl, ALLEGRO_PATH **ret_path); + ALLEGRO_FILE* al_fopen_fd(int fd, const(char)* mode); + ALLEGRO_FILE* al_make_temp_file(const(char)* tmpl, ALLEGRO_PATH **ret_path); /* Specific to slices. */ - ALLEGRO_FILE* al_fopen_slice(ALLEGRO_FILE* fp, size_t initial_size, in char *mode); + ALLEGRO_FILE* al_fopen_slice(ALLEGRO_FILE* fp, size_t initial_size, const(char)* mode); /* Thread-local state. */ ALLEGRO_FILE_INTERFACE* al_get_new_file_interface(); - void al_set_new_file_interface(in ALLEGRO_FILE_INTERFACE* file_interface); + void al_set_new_file_interface(const(ALLEGRO_FILE_INTERFACE)* file_interface); void al_set_standard_file_interface(); void* al_get_file_userdata(ALLEGRO_FILE *f); } diff --git a/allegro5/fshook.d b/allegro5/fshook.d index 2839d87..b118099 100644 --- a/allegro5/fshook.d +++ b/allegro5/fshook.d @@ -35,7 +35,7 @@ nothrow @nogc extern (C) struct ALLEGRO_FS_INTERFACE { - ALLEGRO_FS_ENTRY* function(in char* path) fs_create_entry; + ALLEGRO_FS_ENTRY* function(const(char)* path) fs_create_entry; void function(ALLEGRO_FS_ENTRY* e) fs_destroy_entry; const(char)* function(ALLEGRO_FS_ENTRY* e) fs_entry_name; bool function(ALLEGRO_FS_ENTRY* e) fs_update_entry; @@ -51,16 +51,16 @@ nothrow @nogc extern (C) ALLEGRO_FS_ENTRY* function(ALLEGRO_FS_ENTRY* e) fs_read_directory; bool function(ALLEGRO_FS_ENTRY* e) fs_close_directory; - bool function(in char* path) fs_filename_exists; - bool function(in char* path) fs_remove_filename; + bool function(const(char)* path) fs_filename_exists; + bool function(const(char)* path) fs_remove_filename; ALLEGRO_PATH* function() fs_get_current_directory; - bool function(in char* path) fs_change_directory; - bool function(in char* path) fs_make_directory; + bool function(const(char)* path) fs_change_directory; + bool function(const(char)* path) fs_make_directory; - ALLEGRO_FILE * function(ALLEGRO_FS_ENTRY* e, in char* mode) fs_open_file; + ALLEGRO_FILE * function(ALLEGRO_FS_ENTRY* e, const(char)* mode) fs_open_file; } - ALLEGRO_FS_ENTRY* al_create_fs_entry(in char* path); + ALLEGRO_FS_ENTRY* al_create_fs_entry(const(char)* path); void al_destroy_fs_entry(ALLEGRO_FS_ENTRY* e); const(char)* al_get_fs_entry_name(ALLEGRO_FS_ENTRY* e); bool al_update_fs_entry(ALLEGRO_FS_ENTRY* e); @@ -76,13 +76,13 @@ nothrow @nogc extern (C) ALLEGRO_FS_ENTRY* al_read_directory(ALLEGRO_FS_ENTRY* e); bool al_close_directory(ALLEGRO_FS_ENTRY* e); - bool al_filename_exists(in char* path); - bool al_remove_filename(in char* path); + bool al_filename_exists(const(char)* path); + bool al_remove_filename(const(char)* path); char* al_get_current_directory(); - bool al_change_directory(in char* path); - bool al_make_directory(in char* path); + bool al_change_directory(const(char)* path); + bool al_make_directory(const(char)* path); - ALLEGRO_FILE* al_open_fs_entry(ALLEGRO_FS_ENTRY* e, in char* mode); + ALLEGRO_FILE* al_open_fs_entry(ALLEGRO_FS_ENTRY* e, const(char)* mode); enum ALLEGRO_FOR_EACH_FS_ENTRY_RESULT { @@ -98,6 +98,6 @@ nothrow @nogc extern (C) /* Thread-local state. */ ALLEGRO_FS_INTERFACE* al_get_fs_interface(); - void al_set_fs_interface(in ALLEGRO_FS_INTERFACE* vtable); + void al_set_fs_interface(const(ALLEGRO_FS_INTERFACE)* vtable); void al_set_standard_fs_interface(); } diff --git a/allegro5/joystick.d b/allegro5/joystick.d index 21bfae0..5b4efba 100644 --- a/allegro5/joystick.d +++ b/allegro5/joystick.d @@ -40,15 +40,15 @@ nothrow @nogc extern (C) bool al_get_joystick_active(ALLEGRO_JOYSTICK* joystick); const(char)* al_get_joystick_name(ALLEGRO_JOYSTICK* joystick); - int al_get_joystick_num_sticks(in ALLEGRO_JOYSTICK* joystick); - int al_get_joystick_stick_flags(in ALLEGRO_JOYSTICK* joystick, int stick); /* junk? */ - const(char)* al_get_joystick_stick_name(in ALLEGRO_JOYSTICK* joystick, int stick); + int al_get_joystick_num_sticks(const(ALLEGRO_JOYSTICK)* joystick); + int al_get_joystick_stick_flags(const(ALLEGRO_JOYSTICK)* joystick, int stick); /* junk? */ + const(char)* al_get_joystick_stick_name(const(ALLEGRO_JOYSTICK)* joystick, int stick); - int al_get_joystick_num_axes(in ALLEGRO_JOYSTICK* joystick, int stick); - const(char)* al_get_joystick_axis_name(in ALLEGRO_JOYSTICK* joystick, int stick, int axis); + int al_get_joystick_num_axes(const(ALLEGRO_JOYSTICK)* joystick, int stick); + const(char)* al_get_joystick_axis_name(const(ALLEGRO_JOYSTICK)* joystick, int stick, int axis); - int al_get_joystick_num_buttons(in ALLEGRO_JOYSTICK* joystick); - const(char)* al_get_joystick_button_name(in ALLEGRO_JOYSTICK* joystick, int buttonn); + int al_get_joystick_num_buttons(const(ALLEGRO_JOYSTICK)* joystick); + const(char)* al_get_joystick_button_name(const(ALLEGRO_JOYSTICK)* joystick, int buttonn); void al_get_joystick_state(ALLEGRO_JOYSTICK* joystick, ALLEGRO_JOYSTICK_STATE* ret_state); diff --git a/allegro5/keyboard.d b/allegro5/keyboard.d index 7074e5e..7d0a0e9 100644 --- a/allegro5/keyboard.d +++ b/allegro5/keyboard.d @@ -26,7 +26,7 @@ nothrow @nogc extern (C) const(char)* al_keycode_to_name(int keycode); void al_get_keyboard_state(ALLEGRO_KEYBOARD_STATE* ret_state); - bool al_key_down (in ALLEGRO_KEYBOARD_STATE* state, int keycode); + bool al_key_down (const(ALLEGRO_KEYBOARD_STATE)* state, int keycode); ALLEGRO_EVENT_SOURCE* al_get_keyboard_event_source(); } diff --git a/allegro5/memory.d b/allegro5/memory.d index 8394b76..9f66fe4 100644 --- a/allegro5/memory.d +++ b/allegro5/memory.d @@ -4,18 +4,18 @@ nothrow @nogc extern (C) { struct ALLEGRO_MEMORY_INTERFACE { - void* function(size_t n, int line, in char* file, in char* func) mi_malloc; - void function(void* ptr, int line, in char* file, in char* func) mi_free; - void* function(void* ptr, size_t n, int line, in char* file, in char* func) mi_realloc; - void* function(size_t count, size_t n, int line, in char* file, in char* func) mi_calloc; + void* function(size_t n, int line, const(char)* file, const(char)* func) mi_malloc; + void function(void* ptr, int line, const(char)* file, const(char)* func) mi_free; + void* function(void* ptr, size_t n, int line, const(char)* file, const(char)* func) mi_realloc; + void* function(size_t count, size_t n, int line, const(char)* file, const(char)* func) mi_calloc; } void al_set_memory_interface(ALLEGRO_MEMORY_INTERFACE* iface); - void* al_malloc_with_context(size_t n, int line, in char* file, in char* func); - void al_free_with_context(void* ptr, int line, in char* file, in char* func); - void* al_realloc_with_context(void* ptr, size_t n, int line, in char* file, in char* func); - void* al_calloc_with_context(size_t count, size_t n, int line, in char* file, in char* func); + void* al_malloc_with_context(size_t n, int line, const(char)* file, const(char)* func); + void al_free_with_context(void* ptr, int line, const(char)* file, const(char)* func); + void* al_realloc_with_context(void* ptr, size_t n, int line, const(char)* file, const(char)* func); + void* al_calloc_with_context(size_t count, size_t n, int line, const(char)* file, const(char)* func); void* al_malloc(size_t n) { diff --git a/allegro5/mouse.d b/allegro5/mouse.d index 2eba960..ebe6454 100644 --- a/allegro5/mouse.d +++ b/allegro5/mouse.d @@ -32,8 +32,8 @@ nothrow @nogc extern (C) bool al_set_mouse_w (int w); bool al_set_mouse_axis (int axis, int value); void al_get_mouse_state (ALLEGRO_MOUSE_STATE* ret_state); - bool al_mouse_button_down (in ALLEGRO_MOUSE_STATE* state, int button); - int al_get_mouse_state_axis(in ALLEGRO_MOUSE_STATE* state, int axis); + bool al_mouse_button_down (const(ALLEGRO_MOUSE_STATE)* state, int button); + int al_get_mouse_state_axis(const(ALLEGRO_MOUSE_STATE)* state, int axis); ALLEGRO_EVENT_SOURCE* al_get_mouse_event_source(); diff --git a/allegro5/path.d b/allegro5/path.d index 948e126..eb47c6a 100644 --- a/allegro5/path.d +++ b/allegro5/path.d @@ -17,32 +17,32 @@ nothrow @nogc extern (C) struct ALLEGRO_PATH {}; - ALLEGRO_PATH* al_create_path(in char* str); - ALLEGRO_PATH* al_create_path_for_directory(in char* str); - ALLEGRO_PATH* al_clone_path(in ALLEGRO_PATH* path); + ALLEGRO_PATH* al_create_path(const(char)* str); + ALLEGRO_PATH* al_create_path_for_directory(const(char)* str); + ALLEGRO_PATH* al_clone_path(const(ALLEGRO_PATH)* path); - int al_get_path_num_components(in ALLEGRO_PATH* path); - const(char)* al_get_path_component(in ALLEGRO_PATH* path, int i); - void al_replace_path_component(ALLEGRO_PATH* path, int i, in char* s); + int al_get_path_num_components(const(ALLEGRO_PATH)* path); + const(char)* al_get_path_component(const(ALLEGRO_PATH)* path, int i); + void al_replace_path_component(ALLEGRO_PATH* path, int i, const(char)* s); void al_remove_path_component(ALLEGRO_PATH* path, int i); - void al_insert_path_component(ALLEGRO_PATH* path, int i, in char* s); - const(char)* al_get_path_tail(in ALLEGRO_PATH* path); + void al_insert_path_component(ALLEGRO_PATH* path, int i, const(char)* s); + const(char)* al_get_path_tail(const(ALLEGRO_PATH)* path); void al_drop_path_tail(ALLEGRO_PATH* path); - void al_append_path_component(ALLEGRO_PATH* path, in char* s); - bool al_join_paths(ALLEGRO_PATH* path, in ALLEGRO_PATH* tail); - bool al_rebase_path(in ALLEGRO_PATH* head, ALLEGRO_PATH* tail); - const(char)* al_path_cstr(in ALLEGRO_PATH* path, char delim); + void al_append_path_component(ALLEGRO_PATH* path, const(char)* s); + bool al_join_paths(ALLEGRO_PATH* path, const(ALLEGRO_PATH)* tail); + bool al_rebase_path(const(ALLEGRO_PATH)* head, ALLEGRO_PATH* tail); + const(char)* al_path_cstr(const(ALLEGRO_PATH)* path, char delim); void al_destroy_path(ALLEGRO_PATH* path); - void al_set_path_drive(ALLEGRO_PATH* path, in char* drive); - const(char)* al_get_path_drive(in ALLEGRO_PATH* path); + void al_set_path_drive(ALLEGRO_PATH* path, const(char)* drive); + const(char)* al_get_path_drive(const(ALLEGRO_PATH)* path); - void al_set_path_filename(ALLEGRO_PATH* path, in char* filename); - const(char)* al_get_path_filename(in ALLEGRO_PATH* path); + void al_set_path_filename(ALLEGRO_PATH* path, const(char)* filename); + const(char)* al_get_path_filename(const(ALLEGRO_PATH)* path); - const(char)* al_get_path_extension(in ALLEGRO_PATH* path); - bool al_set_path_extension(ALLEGRO_PATH* path, in char* extension); - const(char)* al_get_path_basename(in ALLEGRO_PATH* path); + const(char)* al_get_path_extension(const(ALLEGRO_PATH)* path); + bool al_set_path_extension(ALLEGRO_PATH* path, const(char)* extension); + const(char)* al_get_path_basename(const(ALLEGRO_PATH)* path); bool al_make_path_canonical(ALLEGRO_PATH* path); } diff --git a/allegro5/system.d b/allegro5/system.d index ccf8183..85b92d7 100644 --- a/allegro5/system.d +++ b/allegro5/system.d @@ -64,10 +64,10 @@ nothrow @nogc extern (C) } ALLEGRO_PATH* al_get_standard_path(int id); - void al_set_exe_name(in char* path); + void al_set_exe_name(const(char)* path); - void al_set_org_name(in char* orgname); - void al_set_app_name(in char* appname); + void al_set_org_name(const(char)* orgname); + void al_set_app_name(const(char)* appname); const(char)* al_get_org_name(); const(char)* al_get_app_name(); diff --git a/allegro5/threads.d b/allegro5/threads.d index d9c3b20..4731f0d 100644 --- a/allegro5/threads.d +++ b/allegro5/threads.d @@ -25,7 +25,7 @@ nothrow @nogc extern (C) ALLEGRO_COND* al_create_cond(); void al_destroy_cond(ALLEGRO_COND* cond); void al_wait_cond(ALLEGRO_COND* cond, ALLEGRO_MUTEX* mutex); - int al_wait_cond_until(ALLEGRO_COND* cond, ALLEGRO_MUTEX* mutex, in ALLEGRO_TIMEOUT* timeout); + int al_wait_cond_until(ALLEGRO_COND* cond, ALLEGRO_MUTEX* mutex, const(ALLEGRO_TIMEOUT)* timeout); void al_broadcast_cond(ALLEGRO_COND* cond); void al_signal_cond(ALLEGRO_COND* cond); } diff --git a/allegro5/timer.d b/allegro5/timer.d index b01f309..0b1dcf5 100644 --- a/allegro5/timer.d +++ b/allegro5/timer.d @@ -12,10 +12,10 @@ nothrow @nogc extern (C) void al_start_timer(ALLEGRO_TIMER* timer); void al_stop_timer(ALLEGRO_TIMER* timer); void al_resume_timer(ALLEGRO_TIMER* timer); - bool al_get_timer_started(in ALLEGRO_TIMER* timer); - double al_get_timer_speed(in ALLEGRO_TIMER* timer); + bool al_get_timer_started(const(ALLEGRO_TIMER)* timer); + double al_get_timer_speed(const(ALLEGRO_TIMER)* timer); void al_set_timer_speed(ALLEGRO_TIMER* timer, double speed_secs); - long al_get_timer_count(in ALLEGRO_TIMER* timer); + long al_get_timer_count(const(ALLEGRO_TIMER)* timer); void al_set_timer_count(ALLEGRO_TIMER* timer, long count); void al_add_timer_count(ALLEGRO_TIMER *timer, long diff); ALLEGRO_EVENT_SOURCE* al_get_timer_event_source(ALLEGRO_TIMER* timer); diff --git a/allegro5/tls.d b/allegro5/tls.d index 024d175..d189414 100644 --- a/allegro5/tls.d +++ b/allegro5/tls.d @@ -24,5 +24,5 @@ nothrow @nogc extern (C) } void al_store_state(ALLEGRO_STATE *state, int flags); - void al_restore_state(in ALLEGRO_STATE *state); + void al_restore_state(const(ALLEGRO_STATE)* state); } diff --git a/allegro5/transformations.d b/allegro5/transformations.d index 7434a85..fa9df31 100644 --- a/allegro5/transformations.d +++ b/allegro5/transformations.d @@ -10,9 +10,9 @@ nothrow @nogc extern (C) } /* Transformations*/ - void al_use_transform(in ALLEGRO_TRANSFORM* trans); - void al_use_projection_transform(in ALLEGRO_TRANSFORM* trans); - void al_copy_transform(ALLEGRO_TRANSFORM* dest, in ALLEGRO_TRANSFORM* src); + void al_use_transform(const(ALLEGRO_TRANSFORM)* trans); + void al_use_projection_transform(const(ALLEGRO_TRANSFORM)* trans); + void al_copy_transform(ALLEGRO_TRANSFORM* dest, const(ALLEGRO_TRANSFORM)* src); void al_identity_transform(ALLEGRO_TRANSFORM* trans); void al_build_transform(ALLEGRO_TRANSFORM* trans, float x, float y, float sx, float sy, float theta); void al_build_camera_transform(ALLEGRO_TRANSFORM *trans, @@ -25,15 +25,15 @@ nothrow @nogc extern (C) void al_rotate_transform_3d(ALLEGRO_TRANSFORM *trans, float x, float y, float z, float angle); void al_scale_transform(ALLEGRO_TRANSFORM* trans, float sx, float sy); void al_scale_transform_3d(ALLEGRO_TRANSFORM *trans, float sx, float sy, float sz); - void al_transform_coordinates(in ALLEGRO_TRANSFORM* trans, float* x, float* y); + void al_transform_coordinates(const(ALLEGRO_TRANSFORM)* trans, float* x, float* y); void al_transform_coordinates_3d(const ALLEGRO_TRANSFORM *trans, float *x, float *y, float *z); - void al_compose_transform(ALLEGRO_TRANSFORM* trans, in ALLEGRO_TRANSFORM* trans2); + void al_compose_transform(ALLEGRO_TRANSFORM* trans, const(ALLEGRO_TRANSFORM)* trans2); ALLEGRO_TRANSFORM* al_get_current_transform(); const(ALLEGRO_TRANSFORM)* al_get_current_inverse_transform(); const(ALLEGRO_TRANSFORM)* al_get_current_projection_transform(); void al_invert_transform(ALLEGRO_TRANSFORM* trans); - int al_check_inverse(in ALLEGRO_TRANSFORM* trans, float tol); + int al_check_inverse(const(ALLEGRO_TRANSFORM)* trans, float tol); void al_orthographic_transform(ALLEGRO_TRANSFORM* trans, float left, float right, float top, float bottom, float n, float f); void al_perspective_transform(ALLEGRO_TRANSFORM* trans, float left, float right, float top, float bottom, float n, float f); void al_horizontal_shear_transform(ALLEGRO_TRANSFORM* trans, float theta); diff --git a/allegro5/utf8.d b/allegro5/utf8.d index a8e36b4..210c8f0 100644 --- a/allegro5/utf8.d +++ b/allegro5/utf8.d @@ -16,47 +16,47 @@ nothrow @nogc extern (C) alias _al_tagbstring ALLEGRO_USTR; alias _al_tagbstring ALLEGRO_USTR_INFO; - ALLEGRO_USTR* al_ustr_new(in char* s); - ALLEGRO_USTR* al_ustr_new_from_buffer(in char* s, size_t size); - ALLEGRO_USTR* al_ustr_newf(in char* fmt, ...); + ALLEGRO_USTR* al_ustr_new(const(char)* s); + ALLEGRO_USTR* al_ustr_new_from_buffer(const(char)* s, size_t size); + ALLEGRO_USTR* al_ustr_newf(const(char)* fmt, ...); void al_ustr_free(ALLEGRO_USTR* us); - const(char)* al_cstr(in ALLEGRO_USTR* us); - void al_ustr_to_buffer(in ALLEGRO_USTR* us, char* buffer, int size); - char* al_cstr_dup(in ALLEGRO_USTR* us); - ALLEGRO_USTR* al_ustr_dup(in ALLEGRO_USTR* us); - ALLEGRO_USTR* al_ustr_dup_substr(in ALLEGRO_USTR* us, int start_pos, int end_pos); + const(char)* al_cstr(const(ALLEGRO_USTR)* us); + void al_ustr_to_buffer(const(ALLEGRO_USTR)* us, char* buffer, int size); + char* al_cstr_dup(const(ALLEGRO_USTR)* us); + ALLEGRO_USTR* al_ustr_dup(const(ALLEGRO_USTR)* us); + ALLEGRO_USTR* al_ustr_dup_substr(const(ALLEGRO_USTR)* us, int start_pos, int end_pos); /* Predefined string */ const(ALLEGRO_USTR)* al_ustr_empty_string(); /* Reference strings */ - const(ALLEGRO_USTR)* al_ref_cstr(ALLEGRO_USTR_INFO* info, in char* s); - const(ALLEGRO_USTR)* al_ref_buffer(ALLEGRO_USTR_INFO* info, in char* s, size_t size); - const(ALLEGRO_USTR)* al_ref_ustr(ALLEGRO_USTR_INFO* info, in ALLEGRO_USTR* us, int start_pos, int end_pos); + const(ALLEGRO_USTR)* al_ref_cstr(ALLEGRO_USTR_INFO* info, const(char)* s); + const(ALLEGRO_USTR)* al_ref_buffer(ALLEGRO_USTR_INFO* info, const(char)* s, size_t size); + const(ALLEGRO_USTR)* al_ref_ustr(ALLEGRO_USTR_INFO* info, const(ALLEGRO_USTR)* us, int start_pos, int end_pos); /* Sizes and offsets */ - size_t al_ustr_size(in ALLEGRO_USTR* us); - size_t al_ustr_length(in ALLEGRO_USTR* us); - int al_ustr_offset(in ALLEGRO_USTR* us, int index); - bool al_ustr_next(in ALLEGRO_USTR* us, int* pos); - bool al_ustr_prev(in ALLEGRO_USTR* us, int* pos); + size_t al_ustr_size(const(ALLEGRO_USTR)* us); + size_t al_ustr_length(const(ALLEGRO_USTR)* us); + int al_ustr_offset(const(ALLEGRO_USTR)* us, int index); + bool al_ustr_next(const(ALLEGRO_USTR)* us, int* pos); + bool al_ustr_prev(const(ALLEGRO_USTR)* us, int* pos); /* Get codepoints */ - int al_ustr_get(in ALLEGRO_USTR* us, int pos); - int al_ustr_get_next(in ALLEGRO_USTR* us, int* pos); - int al_ustr_prev_get(in ALLEGRO_USTR* us, int* pos); + int al_ustr_get(const(ALLEGRO_USTR)* us, int pos); + int al_ustr_get_next(const(ALLEGRO_USTR)* us, int* pos); + int al_ustr_prev_get(const(ALLEGRO_USTR)* us, int* pos); /* Insert */ - bool al_ustr_insert(ALLEGRO_USTR* us1, int pos, in ALLEGRO_USTR* us2); - bool al_ustr_insert_cstr(ALLEGRO_USTR* us, int pos, in char* us2); + bool al_ustr_insert(ALLEGRO_USTR* us1, int pos, const(ALLEGRO_USTR)* us2); + bool al_ustr_insert_cstr(ALLEGRO_USTR* us, int pos, const(char)* us2); size_t al_ustr_insert_chr(ALLEGRO_USTR* us, int pos, int c); /* Append */ - bool al_ustr_append(ALLEGRO_USTR* us1, in ALLEGRO_USTR* us2); - bool al_ustr_append_cstr(ALLEGRO_USTR* us, in char* s); + bool al_ustr_append(ALLEGRO_USTR* us1, const(ALLEGRO_USTR)* us2); + bool al_ustr_append_cstr(ALLEGRO_USTR* us, const(char)* s); size_t al_ustr_append_chr(ALLEGRO_USTR* us, int c); - bool al_ustr_appendf(ALLEGRO_USTR* us, in char* fmt, ...); - bool al_ustr_vappendf(ALLEGRO_USTR* us, in char* fmt, va_list ap); + bool al_ustr_appendf(ALLEGRO_USTR* us, const(char)* fmt, ...); + bool al_ustr_vappendf(ALLEGRO_USTR* us, const(char)* fmt, va_list ap); /* Remove */ bool al_ustr_remove_chr(ALLEGRO_USTR* us, int pos); @@ -67,45 +67,45 @@ nothrow @nogc extern (C) bool al_ustr_trim_ws(ALLEGRO_USTR* us); /* Assign */ - bool al_ustr_assign(ALLEGRO_USTR* us1, in ALLEGRO_USTR* us2); - bool al_ustr_assign_substr(ALLEGRO_USTR* us1, in ALLEGRO_USTR* us2, int start_pos, int end_pos); - bool al_ustr_assign_cstr(ALLEGRO_USTR* us1, in char* s); + bool al_ustr_assign(ALLEGRO_USTR* us1, const(ALLEGRO_USTR)* us2); + bool al_ustr_assign_substr(ALLEGRO_USTR* us1, const(ALLEGRO_USTR)* us2, int start_pos, int end_pos); + bool al_ustr_assign_cstr(ALLEGRO_USTR* us1, const(char)* s); /* Replace */ size_t al_ustr_set_chr(ALLEGRO_USTR* us, int pos, int c); - bool al_ustr_replace_range(ALLEGRO_USTR* us1, int start_pos1, int end_pos1, in ALLEGRO_USTR* us2); + bool al_ustr_replace_range(ALLEGRO_USTR* us1, int start_pos1, int end_pos1, const(ALLEGRO_USTR)* us2); /* Searching */ - int al_ustr_find_chr(in ALLEGRO_USTR* us, int start_pos, int c); - int al_ustr_rfind_chr(in ALLEGRO_USTR* us, int start_pos, int c); - int al_ustr_find_set(in ALLEGRO_USTR* us, int start_pos, in ALLEGRO_USTR* accept); - int al_ustr_find_set_cstr(in ALLEGRO_USTR* us, int start_pos, in char* accept); - int al_ustr_find_cset(in ALLEGRO_USTR* us, int start_pos, in ALLEGRO_USTR* reject); - int al_ustr_find_cset_cstr(in ALLEGRO_USTR* us, int start_pos, in char* reject); - int al_ustr_find_str(in ALLEGRO_USTR* haystack, int start_pos, in ALLEGRO_USTR* needle); - int al_ustr_find_cstr(in ALLEGRO_USTR* haystack, int start_pos, in char* needle); - int al_ustr_rfind_str(in ALLEGRO_USTR* haystack, int start_pos, in ALLEGRO_USTR* needle); - int al_ustr_rfind_cstr(in ALLEGRO_USTR* haystack, int start_pos, in char* needle); - bool al_ustr_find_replace(ALLEGRO_USTR* us, int start_pos, in ALLEGRO_USTR* find, in ALLEGRO_USTR* replace); - bool al_ustr_find_replace_cstr(ALLEGRO_USTR* us, int start_pos, in char* find, in char* replace); + int al_ustr_find_chr(const(ALLEGRO_USTR)* us, int start_pos, int c); + int al_ustr_rfind_chr(const(ALLEGRO_USTR)* us, int start_pos, int c); + int al_ustr_find_set(const(ALLEGRO_USTR)* us, int start_pos, const(ALLEGRO_USTR)* accept); + int al_ustr_find_set_cstr(const(ALLEGRO_USTR)* us, int start_pos, const(char)* accept); + int al_ustr_find_cset(const(ALLEGRO_USTR)* us, int start_pos, const(ALLEGRO_USTR)* reject); + int al_ustr_find_cset_cstr(const(ALLEGRO_USTR)* us, int start_pos, const(char)* reject); + int al_ustr_find_str(const(ALLEGRO_USTR)* haystack, int start_pos, const(ALLEGRO_USTR)* needle); + int al_ustr_find_cstr(const(ALLEGRO_USTR)* haystack, int start_pos, const(char)* needle); + int al_ustr_rfind_str(const(ALLEGRO_USTR)* haystack, int start_pos, const(ALLEGRO_USTR)* needle); + int al_ustr_rfind_cstr(const(ALLEGRO_USTR)* haystack, int start_pos, const(char)* needle); + bool al_ustr_find_replace(ALLEGRO_USTR* us, int start_pos, const(ALLEGRO_USTR)* find, const(ALLEGRO_USTR)* replace); + bool al_ustr_find_replace_cstr(ALLEGRO_USTR* us, int start_pos, const(char)* find, const(char)* replace); /* Compare */ - bool al_ustr_equal(in ALLEGRO_USTR* us1, in ALLEGRO_USTR* us2); - int al_ustr_compare(in ALLEGRO_USTR* u, in ALLEGRO_USTR* v); - int al_ustr_ncompare(in ALLEGRO_USTR* us1, in ALLEGRO_USTR* us2, int n); - bool al_ustr_has_prefix(in ALLEGRO_USTR* u, in ALLEGRO_USTR* v); - bool al_ustr_has_prefix_cstr(in ALLEGRO_USTR* u, in char* s); - bool al_ustr_has_suffix(in ALLEGRO_USTR* u, in ALLEGRO_USTR* v); - bool al_ustr_has_suffix_cstr(in ALLEGRO_USTR* us1, in char* s); + bool al_ustr_equal(const(ALLEGRO_USTR)* us1, const(ALLEGRO_USTR)* us2); + int al_ustr_compare(const(ALLEGRO_USTR)* u, const(ALLEGRO_USTR)* v); + int al_ustr_ncompare(const(ALLEGRO_USTR)* us1, const(ALLEGRO_USTR)* us2, int n); + bool al_ustr_has_prefix(const(ALLEGRO_USTR)* u, const(ALLEGRO_USTR)* v); + bool al_ustr_has_prefix_cstr(const(ALLEGRO_USTR)* u, const(char)* s); + bool al_ustr_has_suffix(const(ALLEGRO_USTR)* u, const(ALLEGRO_USTR)* v); + bool al_ustr_has_suffix_cstr(const(ALLEGRO_USTR)* us1, const(char)* s); /* Low level UTF-8 functions */ size_t al_utf8_width(int c); size_t al_utf8_encode(char* s, int c); /* UTF-16 */ - ALLEGRO_USTR* al_ustr_new_from_utf16(in ushort* s); - size_t al_ustr_size_utf16(in ALLEGRO_USTR* us); - size_t al_ustr_encode_utf16(in ALLEGRO_USTR* us, ushort* s, size_t n); + ALLEGRO_USTR* al_ustr_new_from_utf16(const(ushort)* s); + size_t al_ustr_size_utf16(const(ALLEGRO_USTR)* us); + size_t al_ustr_encode_utf16(const(ALLEGRO_USTR)* us, ushort* s, size_t n); size_t al_utf16_width(int c); size_t al_utf16_encode(ushort* s, int c); }