//  Copyright (c) 2016-2026 Jakub Filipowicz <jakubf@gmail.com>
//
//  This program 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 2 of the License, or
//  (at your option) any later version.
//
//  This program 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 this program; if not, write to the Free Software
//  Foundation, Inc.,
//  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

#ifndef __BRK_H_
#define __BRK_H_

#include <stdbool.h>

#include "cp/eval.h"

typedef void (*brk_iter_f)(unsigned id, const char *expr, bool enabled, void *ctx);

void brk_del_all();
int brk_delete(unsigned id);
int brk_enable(unsigned id, bool enabled);
int brk_eval(unsigned id, int *result, char **err_msg, int *err_beg, int *err_end);
void brk_foreach(brk_iter_f cb, void *ctx);
bool brk_check();
int brk_hit_get();
void brk_hit_clear();
int brk_add(char *expression, char **err_msg, int *err_beg, int *err_end);
int brk_edit(unsigned id, char *expression, char **err_msg, int *err_beg, int *err_end);

#endif

// vim: tabstop=4 shiftwidth=4 autoindent
