Compare commits
5 Commits
c016a5e96e
...
8b1d3709b7
Author | SHA1 | Date | |
---|---|---|---|
8b1d3709b7 | |||
4db8593e5b | |||
bea35bf952 | |||
ad5e0ebe11 | |||
ee99e50656 |
@ -6,6 +6,8 @@ pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||
|
||||
add_compile_options(-Wall -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
||||
|
||||
add_subdirectory(resources)
|
||||
add_subdirectory(doxygen)
|
||||
add_subdirectory(version)
|
||||
@ -32,8 +34,6 @@ set(SOURCE
|
||||
${LAYER_SELECTOR_SOURCES}
|
||||
)
|
||||
|
||||
add_compile_options(-Wall -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c)
|
||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
||||
add_dependencies(${PROJECT_NAME} version)
|
||||
|
@ -151,7 +151,7 @@ void bounding_box_calculate_path_box(GList *vertices, double thickness,
|
||||
GList *vertex_iterator;
|
||||
struct vector_2d pt;
|
||||
|
||||
printf("Warning! Function bounding_box_calculate_path_box not yet implemented correctly!\n");
|
||||
//printf("Warning! Function bounding_box_calculate_path_box not yet implemented correctly!\n");
|
||||
|
||||
if (!vertices || !box)
|
||||
return;
|
||||
|
@ -177,6 +177,7 @@ static void render_cell(struct gds_cell *cell, struct cairo_layer *layers, doubl
|
||||
cairo_stroke(cr);
|
||||
break;
|
||||
case GRAPHIC_BOX:
|
||||
/* Expected fallthrough */
|
||||
case GRAPHIC_POLYGON:
|
||||
cairo_set_line_width(cr, 0.1/scale);
|
||||
cairo_close_path(cr);
|
||||
@ -187,6 +188,36 @@ static void render_cell(struct gds_cell *cell, struct cairo_layer *layers, doubl
|
||||
} /* for gfx list */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Read a line from a file descriptor
|
||||
*
|
||||
* In case of a broken pipe / closed writing end, it will terminate
|
||||
*
|
||||
* @param fd File descriptor to read from
|
||||
* @param buff Buffer to write data in
|
||||
* @param buff_size Buffer size
|
||||
* @return length of read data
|
||||
*/
|
||||
static int read_line_from_fd(int fd, char *buff, size_t buff_size)
|
||||
{
|
||||
ssize_t cnt;
|
||||
char c;
|
||||
unsigned int buff_cnt = 0;
|
||||
|
||||
while ((cnt = read(fd, &c, 1)) == 1) {
|
||||
if (buff_cnt < (buff_size-1)) {
|
||||
buff[buff_cnt++] = c;
|
||||
if (c == '\n')
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
buff[buff_cnt] = 0;
|
||||
return (int)buff_cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Render \p cell to a PDF file specified by \p pdf_file
|
||||
* @param cell Toplevel cell to @ref Cairo-Renderer
|
||||
|
@ -1,3 +1,4 @@
|
||||
project(libversion)
|
||||
add_library(version STATIC "version.c")
|
||||
execute_process(COMMAND bash ./generate-version-string.sh
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user