2017-01-29 00:03:23 +00:00
|
|
|
/*
|
|
|
|
4coder_miblo_numbers.cpp - Commands for so called "Miblo Number Operations" which involve incrementing
|
|
|
|
and decrementing various forms of number as numerical objects despite being encoded as text objects.
|
|
|
|
*/
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2017-01-29 00:03:23 +00:00
|
|
|
// TOP
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
static i32
|
2019-04-05 02:03:36 +00:00
|
|
|
get_numeric_string_at_cursor(Application_Links *app, Buffer_ID buffer, i32 start_pos, i32 *numeric_start, i32 *numeric_end){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 result = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
|
|
|
char current = buffer_get_char(app, buffer, start_pos);
|
|
|
|
|
|
|
|
if (char_is_numeric(current)){
|
|
|
|
char chunk[1024];
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 chunk_size = sizeof(chunk);
|
2018-11-20 08:18:54 +00:00
|
|
|
Stream_Chunk stream = {};
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos = start_pos;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos1 = 0;
|
|
|
|
i32 pos2 = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
|
|
|
if (init_stream_chunk(&stream, app, buffer, start_pos, chunk, chunk_size)){
|
|
|
|
|
2019-04-05 02:03:36 +00:00
|
|
|
b32 still_looping = true;
|
|
|
|
for (;still_looping;){
|
2017-03-23 19:15:33 +00:00
|
|
|
for (; pos >= stream.start; --pos){
|
2016-10-27 23:45:41 +00:00
|
|
|
char at_pos = stream.data[pos];
|
|
|
|
if (!char_is_numeric(at_pos)){
|
|
|
|
++pos;
|
|
|
|
goto double_break_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
still_looping = backward_stream_chunk(&stream);
|
|
|
|
}
|
|
|
|
double_break_1:;
|
|
|
|
pos1 = pos;
|
|
|
|
|
|
|
|
if (init_stream_chunk(&stream, app, buffer, start_pos, chunk, chunk_size)){
|
|
|
|
still_looping = 1;
|
|
|
|
while (still_looping){
|
2017-03-23 19:15:33 +00:00
|
|
|
for (; pos < stream.end; ++pos){
|
2016-10-27 23:45:41 +00:00
|
|
|
char at_pos = stream.data[pos];
|
|
|
|
if (!char_is_numeric(at_pos)){
|
|
|
|
goto double_break_2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
still_looping = forward_stream_chunk(&stream);
|
|
|
|
}
|
|
|
|
double_break_2:;
|
|
|
|
pos2 = pos;
|
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
result = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
*numeric_start = pos1;
|
|
|
|
*numeric_end = pos2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Miblo_Number_Info{
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 start, end;
|
|
|
|
i32 x;
|
2016-10-27 23:45:41 +00:00
|
|
|
};
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
static i32
|
2019-04-05 02:03:36 +00:00
|
|
|
get_numeric_at_cursor(Application_Links *app, Buffer_ID buffer, i32 pos, Miblo_Number_Info *info){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 result = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 numeric_start = 0, numeric_end = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
if (get_numeric_string_at_cursor(app, buffer, pos, &numeric_start, &numeric_end)){
|
|
|
|
char numeric_string[1024];
|
2017-03-23 19:15:33 +00:00
|
|
|
String str = make_string(numeric_string, numeric_end - numeric_start, sizeof(numeric_string));
|
2016-10-27 23:45:41 +00:00
|
|
|
if (str.size < str.memory_size){
|
|
|
|
buffer_read_range(app, buffer, numeric_start, numeric_end, numeric_string);
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 x = str_to_int(str);
|
2016-10-27 23:45:41 +00:00
|
|
|
int_to_str(&str, x+1);
|
|
|
|
|
|
|
|
info->start = numeric_start;
|
|
|
|
info->end = numeric_end;
|
|
|
|
info->x = x;
|
2017-03-23 19:15:33 +00:00
|
|
|
result = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_increment_basic)
|
|
|
|
CUSTOM_DOC("Increment an integer under the cursor by one.")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
View_Summary view = get_active_view(app, AccessOpen);
|
2019-04-05 02:03:36 +00:00
|
|
|
Buffer_ID buffer = 0;
|
|
|
|
view_get_buffer(app, view.view_id, AccessOpen, &buffer);
|
2018-11-20 08:18:54 +00:00
|
|
|
Miblo_Number_Info number = {};
|
2019-04-05 02:03:36 +00:00
|
|
|
if (get_numeric_at_cursor(app, buffer, view.cursor.pos, &number)){
|
2016-10-27 23:45:41 +00:00
|
|
|
char str_space[1024];
|
|
|
|
String str = make_fixed_width_string(str_space);
|
|
|
|
int_to_str(&str, number.x + 1);
|
2019-04-05 02:03:36 +00:00
|
|
|
buffer_replace_range(app, buffer, number.start, number.end, str);
|
2016-10-27 23:45:41 +00:00
|
|
|
view_set_cursor(app, &view, seek_pos(number.start + str.size - 1), 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_decrement_basic)
|
|
|
|
CUSTOM_DOC("Decrement an integer under the cursor by one.")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
View_Summary view = get_active_view(app, AccessOpen);
|
2019-04-05 02:03:36 +00:00
|
|
|
Buffer_ID buffer = 0;
|
|
|
|
view_get_buffer(app, view.view_id, AccessOpen, &buffer);
|
2018-11-20 08:18:54 +00:00
|
|
|
Miblo_Number_Info number = {};
|
2019-04-05 02:03:36 +00:00
|
|
|
if (get_numeric_at_cursor(app, buffer, view.cursor.pos, &number)){
|
2016-10-27 23:45:41 +00:00
|
|
|
char str_space[1024];
|
|
|
|
String str = make_fixed_width_string(str_space);
|
|
|
|
int_to_str(&str, number.x - 1);
|
2019-04-05 02:03:36 +00:00
|
|
|
buffer_replace_range(app, buffer, number.start, number.end, str);
|
2016-10-27 23:45:41 +00:00
|
|
|
view_set_cursor(app, &view, seek_pos(number.start + str.size - 1), 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NOTE(allen): miblo time stamp format
|
|
|
|
// (h+:)?m?m:ss
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
static i32
|
2019-04-05 02:03:36 +00:00
|
|
|
get_timestamp_string_at_cursor(Application_Links *app, Buffer_ID buffer, i32 start_pos, i32 *timestamp_start, i32 *timestamp_end){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 result = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
|
|
|
char current = buffer_get_char(app, buffer, start_pos);
|
|
|
|
|
|
|
|
if (char_is_numeric(current) || current == ':'){
|
|
|
|
char chunk[1024];
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 chunk_size = sizeof(chunk);
|
2018-11-20 08:18:54 +00:00
|
|
|
Stream_Chunk stream = {};
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos = start_pos;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos1 = 0;
|
|
|
|
i32 pos2 = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
|
|
|
if (init_stream_chunk(&stream, app, buffer, start_pos, chunk, chunk_size)){
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 still_looping = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
while (still_looping){
|
2017-03-23 19:15:33 +00:00
|
|
|
for (; pos >= stream.start; --pos){
|
2016-10-27 23:45:41 +00:00
|
|
|
char at_pos = stream.data[pos];
|
|
|
|
if (!(char_is_numeric(at_pos) || at_pos == ':')){
|
|
|
|
++pos;
|
|
|
|
goto double_break_1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
still_looping = backward_stream_chunk(&stream);
|
|
|
|
}
|
|
|
|
double_break_1:;
|
|
|
|
pos1 = pos;
|
|
|
|
|
|
|
|
if (init_stream_chunk(&stream, app, buffer, start_pos, chunk, chunk_size)){
|
|
|
|
|
|
|
|
still_looping = 1;
|
|
|
|
while (still_looping){
|
2017-03-23 19:15:33 +00:00
|
|
|
for (; pos < stream.end; ++pos){
|
2016-10-27 23:45:41 +00:00
|
|
|
char at_pos = stream.data[pos];
|
|
|
|
if (!(char_is_numeric(at_pos) || at_pos == ':')){
|
|
|
|
goto double_break_2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
still_looping = forward_stream_chunk(&stream);
|
|
|
|
}
|
|
|
|
double_break_2:;
|
|
|
|
pos2 = pos;
|
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
result = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
*timestamp_start = pos1;
|
|
|
|
*timestamp_end = pos2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Miblo_Timestamp{
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 second;
|
|
|
|
i32 minute;
|
|
|
|
i32 hour;
|
2016-10-27 23:45:41 +00:00
|
|
|
};
|
2018-11-20 08:18:54 +00:00
|
|
|
static Miblo_Timestamp null_miblo_timestamp = {};
|
2016-10-27 23:45:41 +00:00
|
|
|
|
|
|
|
enum{
|
|
|
|
MIBLO_SECOND,
|
|
|
|
MIBLO_MINUTE,
|
|
|
|
MIBLO_HOUR
|
|
|
|
};
|
|
|
|
|
|
|
|
static Miblo_Timestamp
|
2019-02-26 23:17:53 +00:00
|
|
|
increment_timestamp(Miblo_Timestamp t, i32 type, i32 amt){
|
2016-10-27 23:45:41 +00:00
|
|
|
Miblo_Timestamp r = t;
|
|
|
|
switch (type){
|
2017-07-18 15:50:37 +00:00
|
|
|
case MIBLO_SECOND: /* CASE second */
|
2016-10-27 23:45:41 +00:00
|
|
|
r.second += amt;
|
|
|
|
|
2017-07-18 15:50:37 +00:00
|
|
|
// 1. Modulo r.second into [0,59]
|
|
|
|
// 2. What is thrown away by (1) store in amt, divide by 60, round down even when negative.
|
|
|
|
amt = 0;
|
|
|
|
if (r.second < 0){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos_second = -r.second;
|
2017-07-18 15:50:37 +00:00
|
|
|
amt = -((pos_second + 59)/60);
|
|
|
|
r.second = 60 - (pos_second % 60);
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
2017-07-18 15:50:37 +00:00
|
|
|
else if (r.second >= 60){
|
|
|
|
amt = r.second/60;
|
|
|
|
r.second = (r.second % 60);
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
|
2017-07-18 15:50:37 +00:00
|
|
|
case MIBLO_MINUTE: /* CASE minute */
|
2016-10-27 23:45:41 +00:00
|
|
|
r.minute += amt;
|
|
|
|
|
2017-07-18 15:50:37 +00:00
|
|
|
// 1. Modulo r.minute into [0,59]
|
|
|
|
// 2. What is thrown away by (1) store in amt, divide by 60, round down even when negative.
|
|
|
|
amt = 0;
|
|
|
|
if (r.minute < 0){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 pos_minute = -r.minute;
|
2017-07-18 15:50:37 +00:00
|
|
|
amt = -((pos_minute + 59)/60);
|
|
|
|
r.minute = 60 - (pos_minute % 60);
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
2017-07-18 15:50:37 +00:00
|
|
|
else if (r.minute >= 60){
|
|
|
|
amt = r.minute/60;
|
|
|
|
r.minute = (r.minute % 60);
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
|
2017-07-18 15:50:37 +00:00
|
|
|
case MIBLO_HOUR: /* CASE hour */
|
2016-10-27 23:45:41 +00:00
|
|
|
r.hour += amt;
|
2017-07-18 15:50:37 +00:00
|
|
|
if (r.hour < 0){
|
|
|
|
r.second = 0;
|
|
|
|
r.minute = 0;
|
|
|
|
r.hour = 0;
|
|
|
|
}
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return(r);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
timestamp_to_str(String *dest, Miblo_Timestamp t){
|
|
|
|
dest->size = 0;
|
|
|
|
|
|
|
|
if (t.hour > 0){
|
|
|
|
append_int_to_str(dest, t.hour);
|
2017-01-29 00:03:23 +00:00
|
|
|
append(dest, ":");
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (t.minute >= 10){
|
|
|
|
append_int_to_str(dest, t.minute);
|
|
|
|
}
|
|
|
|
else if (t.hour > 0){
|
|
|
|
append(dest, "0");
|
|
|
|
append_int_to_str(dest, t.minute);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
append_int_to_str(dest, t.minute);
|
|
|
|
}
|
|
|
|
append(dest, ":");
|
|
|
|
|
|
|
|
if (t.second >= 10){
|
|
|
|
append_int_to_str(dest, t.second);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
append(dest, "0");
|
|
|
|
append_int_to_str(dest, t.second);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Miblo_Timestamp_Info{
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 start, end;
|
2016-10-27 23:45:41 +00:00
|
|
|
Miblo_Timestamp time;
|
|
|
|
};
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
static i32
|
2019-04-05 02:03:36 +00:00
|
|
|
get_timestamp_at_cursor(Application_Links *app, Buffer_ID buffer, i32 pos, Miblo_Timestamp_Info *info){
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 result = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 timestamp_start = 0, timestamp_end = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
if (get_timestamp_string_at_cursor(app, buffer, pos, ×tamp_start, ×tamp_end)){
|
|
|
|
char timestamp_string[1024];
|
2017-03-23 19:15:33 +00:00
|
|
|
String str = make_string(timestamp_string, timestamp_end - timestamp_start, sizeof(timestamp_string));
|
2016-10-27 23:45:41 +00:00
|
|
|
if (str.size < str.memory_size){
|
|
|
|
buffer_read_range(app, buffer, timestamp_start, timestamp_end, timestamp_string);
|
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 count_colons = 0;
|
|
|
|
for (i32 i = 0; i < str.size; ++i){
|
2016-10-27 23:45:41 +00:00
|
|
|
if (str.str[i] == ':'){
|
2017-01-29 00:03:23 +00:00
|
|
|
++count_colons;
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (count_colons == 1 || count_colons == 2){
|
2018-11-20 08:18:54 +00:00
|
|
|
Miblo_Timestamp t = {};
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 success = 0;
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 i = 0;
|
|
|
|
i32 number_start[3], number_end[3];
|
|
|
|
for (i32 k = 0; k < 3; ++k){
|
2016-10-27 23:45:41 +00:00
|
|
|
number_start[k] = i;
|
|
|
|
for (; i <= str.size; ++i){
|
|
|
|
if (i == str.size || str.str[i] == ':'){
|
|
|
|
number_end[k] = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
++i;
|
|
|
|
if (i >= timestamp_end){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (count_colons == 2){
|
2017-03-23 19:15:33 +00:00
|
|
|
t.hour = str_to_int(make_string(str.str + number_start[0], number_end[0] - number_start[0]));
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
if (number_end[1] - number_start[1] == 2){
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
t.minute = str_to_int(make_string(str.str + number_start[1], number_end[1] - number_start[1]));
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
if (number_end[2] - number_start[2] == 2){
|
|
|
|
t.second = str_to_int(make_string(str.str + number_start[2], number_end[2] - number_start[2]));
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
success = 1;
|
2017-01-29 00:03:23 +00:00
|
|
|
}
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
2017-03-23 19:15:33 +00:00
|
|
|
if (number_end[0] - number_start[0] == 2 || number_end[0] - number_start[0] == 1){
|
|
|
|
t.minute = str_to_int(make_string(str.str + number_start[0], number_end[0] - number_start[0]));
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
if (number_end[1] - number_start[1] == 2){
|
|
|
|
t.second = str_to_int(make_string(str.str + number_start[1], number_end[1] - number_start[1]));
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2017-03-23 19:15:33 +00:00
|
|
|
success = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (success){
|
2017-01-29 00:03:23 +00:00
|
|
|
info->start = timestamp_start;
|
|
|
|
info->end = timestamp_end;
|
|
|
|
info->time = t;
|
2017-03-23 19:15:33 +00:00
|
|
|
result = 1;
|
2016-10-27 23:45:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2019-02-26 23:17:53 +00:00
|
|
|
miblo_time_stamp_alter(Application_Links *app, i32 unit_type, i32 amt){
|
2016-10-27 23:45:41 +00:00
|
|
|
View_Summary view = get_active_view(app, AccessOpen);
|
2019-04-05 02:03:36 +00:00
|
|
|
Buffer_ID buffer = 0;
|
|
|
|
view_get_buffer(app, view.view_id, AccessOpen, &buffer);
|
2016-10-27 23:45:41 +00:00
|
|
|
|
2018-11-20 08:18:54 +00:00
|
|
|
Miblo_Timestamp_Info timestamp = {};
|
2019-04-05 02:03:36 +00:00
|
|
|
if (get_timestamp_at_cursor(app, buffer, view.cursor.pos, ×tamp)){
|
2016-10-27 23:45:41 +00:00
|
|
|
char str_space[1024];
|
|
|
|
String str = make_fixed_width_string(str_space);
|
|
|
|
|
|
|
|
Miblo_Timestamp inc_timestamp = increment_timestamp(timestamp.time, unit_type, amt);
|
|
|
|
timestamp_to_str(&str, inc_timestamp);
|
2019-04-05 02:03:36 +00:00
|
|
|
buffer_replace_range(app, buffer, timestamp.start, timestamp.end, str);
|
2016-10-27 23:45:41 +00:00
|
|
|
view_set_cursor(app, &view, seek_pos(timestamp.start + str.size - 1), 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp)
|
|
|
|
CUSTOM_DOC("Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
miblo_time_stamp_alter(app, MIBLO_SECOND, 1);
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp)
|
|
|
|
CUSTOM_DOC("Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
miblo_time_stamp_alter(app, MIBLO_SECOND, -1);
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute)
|
|
|
|
CUSTOM_DOC("Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
miblo_time_stamp_alter(app, MIBLO_MINUTE, 1);
|
|
|
|
}
|
|
|
|
|
2017-11-15 23:57:21 +00:00
|
|
|
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute)
|
|
|
|
CUSTOM_DOC("Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss")
|
|
|
|
{
|
2016-10-27 23:45:41 +00:00
|
|
|
miblo_time_stamp_alter(app, MIBLO_MINUTE, -1);
|
|
|
|
}
|
|
|
|
|
2017-01-29 00:03:23 +00:00
|
|
|
// BOTTOM
|