00001 /* 00002 * File Name: scbpoint.c 00003 */ 00004 00005 /* 00006 * This file is part of liberscribble. 00007 * 00008 * liberscribble is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * liberscribble is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /** 00023 * Copyright (C) 2008 iRex Technologies B.V. 00024 * All rights reserved. 00025 */ 00026 00027 00028 #define _GNU_SOURCE 00029 00030 //---------------------------------------------------------------------------- 00031 // Include Files 00032 //---------------------------------------------------------------------------- 00033 00034 // system include files, between < > 00035 #include <stdio.h> 00036 00037 // ereader include files, between < > 00038 00039 // local include files, between " " 00040 #include "scbpoint.h" 00041 #include "scbtype.h" 00042 #include "scblog.h" 00043 00044 00045 //---------------------------------------------------------------------------- 00046 // Type Declarations 00047 //---------------------------------------------------------------------------- 00048 00049 00050 //---------------------------------------------------------------------------- 00051 // Global Constants 00052 //---------------------------------------------------------------------------- 00053 00054 00055 //---------------------------------------------------------------------------- 00056 // Static Variables 00057 //---------------------------------------------------------------------------- 00058 00059 00060 //============================================================================ 00061 // Local Function Definitions 00062 //============================================================================ 00063 00064 00065 //============================================================================ 00066 // Functions Implementation 00067 //============================================================================ 00068 00069 gboolean erscribble_point_load(ScbDevPointPtr point, ScbStreamPtr stream) 00070 { 00071 ERSCRIBBLE_RET_FALSE_IF(NULL == point || NULL == stream, "Invalid point or stream!"); 00072 00073 return erscribble_read_stream(stream, point, sizeof(ScbDevPoint)); 00074 } 00075 00076 00077 void erscribble_point_dump(const ScbPointPtr p) 00078 { 00079 ERSCRIBBLE_RET_IF(p == NULL, "NULL pointer!"); 00080 DUMPPRINTF("(%d, %d)", p->x, p->y); 00081 }