Skip to content

Commit

Permalink
Renaming all files to remove the unncessary prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
navaneeth committed Jul 28, 2012
1 parent 335a327 commit 51c6a6a
Show file tree
Hide file tree
Showing 32 changed files with 111 additions and 112 deletions.
39 changes: 19 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(varnam)
message ("Generating project ${PROJECT_NAME}")

set(VARNAM_LIBRARY_NAME "varnam")
set(FOREIGN_LIBRARY_NAME "foreign-functions")
set(DEPS_LIBRARY_NAME "deps")

set(VARNAM_VERSION_MAJOR 1)
set(VARNAM_VERSION_MINOR 0)
Expand All @@ -27,14 +27,14 @@ add_definitions(-DHAVE_SNPRINTF -DPREFER_PORTABLE_SNPRINTF -DNEED_ASPRINTF)

# Append the source files here
list (APPEND VARNAM_SOURCES
varnam-util.c
varnam-trie.c
varnam-strbuf.c
varnam-tl.c
varnam-symbol-table.c
varnam-words-table.c
varnam-array.c
varnam-token.c
util.c
trie.c
strbuf.c
transliterate.c
symbol-table.c
words-table.c
varray.c
token.c
vword.c
learn.c
rendering.c
Expand All @@ -45,16 +45,15 @@ list (APPEND VARNAM_SOURCES
# Append the header files here. this will get copied to include directory
list (APPEND VARNAM_INCLUDE_FILES
varnam.h
varnam-api.h
varnam-result-codes.h
varnam-trie.h
varnam-types.h
varnam-util.h
varnam-symbol-table.h
api.h
result-codes.h
vtypes.h
util.h
varray.h
)

# Build foreign functions
add_subdirectory(foreign)
# Build dependencies
add_subdirectory(deps)

# Build tests
add_subdirectory(tests)
Expand All @@ -68,15 +67,15 @@ SET_TARGET_PROPERTIES(${VARNAM_LIBRARY_NAME} PROPERTIES

INSTALL ( TARGETS ${VARNAM_LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
INSTALL ( FILES ${VARNAM_INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lib${VARNAM_LIBRARY_NAME})
INSTALL ( FILES foreign/sqlite3.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lib${VARNAM_LIBRARY_NAME}/foreign)
INSTALL ( FILES deps/sqlite3.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lib${VARNAM_LIBRARY_NAME}/deps)

IF(CMAKE_COMPILER_IS_GNUCC)
# sqlite requires pthread and dl
target_link_libraries(${VARNAM_LIBRARY_NAME} ${FOREIGN_LIBRARY_NAME} pthread dl)
target_link_libraries(${VARNAM_LIBRARY_NAME} ${DEPS_LIBRARY_NAME} pthread dl)
ENDIF()

IF(MSVC)
target_link_libraries(${VARNAM_LIBRARY_NAME} ${FOREIGN_LIBRARY_NAME})
target_link_libraries(${VARNAM_LIBRARY_NAME} ${DEPS_LIBRARY_NAME})
ENDIF()

add_custom_target(vstfiles
Expand Down
6 changes: 3 additions & 3 deletions varnam-api.h → api.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#define VARNAM_API_H_INCLUDED_093510

#include <stdlib.h>
#include "varnam-types.h"
#include "varnam-util.h"
#include "varnam-array.h"
#include "vtypes.h"
#include "util.h"
#include "varray.h"

/**
* Initializes the varnam library.
Expand Down
6 changes: 3 additions & 3 deletions foreign/CMakeLists.txt → deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 2.6)

project (foreign_functions)
project (deps)
message ("Generating project ${PROJECT_NAME}")

# This builds the 3rd party code that we uses. It uses very less level of warnings
Expand All @@ -20,9 +20,9 @@ ENDIF()

add_definitions(-DSQLITE_CASE_SENSITIVE_LIKE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS)

list (APPEND FOREIGN_SOURCES
list (APPEND DEPS_SOURCES
snprintf.c
sqlite3.c
)

add_library (${FOREIGN_LIBRARY_NAME} STATIC ${FOREIGN_SOURCES})
add_library (${DEPS_LIBRARY_NAME} STATIC ${DEPS_SOURCES})
2 changes: 1 addition & 1 deletion foreign/snprintf.c → deps/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
/* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */
/* ============================================= */

#include "../varnam-util.h"
#include "../util.h"

#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
#define PORTABLE_SNPRINTF_VERSION_MINOR 2
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions learn.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "varnam-api.h"
#include "varnam-types.h"
#include "varnam-array.h"
#include "varnam-util.h"
#include "varnam-result-codes.h"
#include "varnam-symbol-table.h"
#include "varnam-words-table.h"
#include "api.h"
#include "vtypes.h"
#include "varray.h"
#include "util.h"
#include "result-codes.h"
#include "symbol-table.h"
#include "words-table.h"

static strbuf*
sanitize_word (varnam *handle, const char *word)
Expand Down
8 changes: 4 additions & 4 deletions renderer/ml_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <string.h>

#include "renderers.h"
#include "../varnam-util.h"
#include "../varnam-types.h"
#include "../varnam-result-codes.h"
#include "../varnam-symbol-table.h"
#include "../util.h"
#include "../vtypes.h"
#include "../result-codes.h"
#include "../symbol-table.h"

#define RENDER_VALUE2_TAG "render_value2"
#define CHIL_TAG "chill"
Expand Down
4 changes: 2 additions & 2 deletions renderer/renderers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef RENDERING_RENDERERS_H_INCLUDED_105305
#define RENDERING_RENDERERS_H_INCLUDED_105305

#include "../varnam-types.h"
#include "../varnam-util.h"
#include "../vtypes.h"
#include "../util.h"

int
ml_unicode_renderer(varnam *handle,
Expand Down
11 changes: 5 additions & 6 deletions rendering.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
#include <assert.h>
#include <string.h>

#include "varnam-symbol-table.h"
#include "varnam-result-codes.h"
#include "varnam-array.h"
#include "varnam-types.h"
#include "symbol-table.h"
#include "result-codes.h"
#include "varray.h"
#include "vtypes.h"
#include "rendering.h"
#include "vword.h"
#include "varnam-api.h"
#include "varnam-array.h"
#include "api.h"

static vtoken_renderer*
get_renderer(varnam *handle)
Expand Down
4 changes: 2 additions & 2 deletions rendering.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */

#include "varnam-types.h"
#include "varnam-array.h"
#include "vtypes.h"
#include "varray.h"

#ifndef RENDERING_H_INCLUDED_200624
#define RENDERING_H_INCLUDED_200624
Expand Down
2 changes: 1 addition & 1 deletion varnam-result-codes.h → result-codes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* varnam-result-codes.h
/* Specifies the return codes
*
* Copyright (C) Navaneeth.K.N
*
Expand Down
6 changes: 3 additions & 3 deletions varnam-strbuf.c → strbuf.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* strbuf.c - dynamically growing string buffer
/* Dynamically growing string buffer
*
* Copyright (C) Navaneeth.K.N
*
Expand All @@ -22,8 +22,8 @@
#include <stdarg.h>
#include <stdio.h>

#include "varnam-util.h"
#include "varnam-array.h"
#include "util.h"
#include "varray.h"

static int grow_buffer(struct strbuf *string)
{
Expand Down
12 changes: 6 additions & 6 deletions varnam-symbol-table.c → symbol-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
#include <string.h>
#include <assert.h>

#include "varnam-symbol-table.h"
#include "varnam-util.h"
#include "varnam-types.h"
#include "varnam-result-codes.h"
#include "varnam-api.h"
#include "varnam-token.h"
#include "symbol-table.h"
#include "util.h"
#include "vtypes.h"
#include "result-codes.h"
#include "api.h"
#include "token.h"

int
ensure_schema_exists(varnam *handle, char **msg)
Expand Down
4 changes: 2 additions & 2 deletions varnam-symbol-table.h → symbol-table.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef VARNAM_SYMBOL_TABLE_H_INCLUDED_120215
#define VARNAM_SYMBOL_TABLE_H_INCLUDED_120215

#include "varnam-types.h"
#include "varnam-array.h"
#include "vtypes.h"
#include "varray.h"

/**
* checks the schema availability. this function will create it when necessary
Expand Down
10 changes: 5 additions & 5 deletions varnam-token.c → token.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */

#include <string.h>
#include "varnam-token.h"
#include "varnam-types.h"
#include "varnam-util.h"
#include "varnam-array.h"
#include "varnam-result-codes.h"
#include "token.h"
#include "vtypes.h"
#include "util.h"
#include "varray.h"
#include "result-codes.h"

static void
initialize_token (vtoken *tok,
Expand Down
4 changes: 2 additions & 2 deletions varnam-token.h → token.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef VARNAM_TOKEN_H_INCLUDED_090112
#define VARNAM_TOKEN_H_INCLUDED_090112

#include "varnam-types.h"
#include "varnam-array.h"
#include "vtypes.h"
#include "varray.h"

struct token*
Token(int id, int type, int match_type, const char* pattern, const char* value1, const char* value2, const char* tag);
Expand Down
16 changes: 8 additions & 8 deletions varnam-tl.c → transliterate.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
#include <string.h>
#include <assert.h>

#include "foreign/sqlite3.h"
#include "varnam-api.h"
#include "varnam-util.h"
#include "varnam-types.h"
#include "varnam-result-codes.h"
#include "varnam-symbol-table.h"
#include "varnam-array.h"
#include "varnam-token.h"
#include "deps/sqlite3.h"
#include "api.h"
#include "util.h"
#include "vtypes.h"
#include "result-codes.h"
#include "symbol-table.h"
#include "varray.h"
#include "token.h"
#include "vword.h"
#include "rendering.h"

Expand Down
6 changes: 3 additions & 3 deletions varnam-trie.c → trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <stdlib.h>
#include <assert.h>

#include "varnam-util.h"
#include "varnam-trie.h"
#include "varnam-result-codes.h"
#include "util.h"
#include "trie.h"
#include "result-codes.h"

static struct trie *trie_new(const char *label, void *value)
{
Expand Down
2 changes: 1 addition & 1 deletion varnam-trie.h → trie.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef TRIE_H_INCLUDED_095519
#define TRIE_H_INCLUDED_095519

#include "varnam-util.h"
#include "util.h"

struct trie {
int root; /* if 1, then this is root */
Expand Down
6 changes: 3 additions & 3 deletions varnam-util.c → util.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* util.c
/* Utility functions
*
* Copyright (C) 2010 Navaneeth.K.N
*
Expand All @@ -22,8 +22,8 @@
#include <stdlib.h>
#include <ctype.h>

#include "varnam-util.h"
#include "varnam-types.h"
#include "util.h"
#include "vtypes.h"

/**
* substr(str,start,length,output) writes length characters of str beginning with start to substring.
Expand Down
4 changes: 2 additions & 2 deletions varnam-util.h → util.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ typedef int bool;
#define false 0
#define true 1

#include "varnam-array.h"
#include "varnam-types.h"
#include "varray.h"
#include "vtypes.h"

#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))

Expand Down
16 changes: 8 additions & 8 deletions varnam.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
#include <string.h>
#include <stdarg.h>

#include "varnam-array.h"
#include "varnam-api.h"
#include "varnam-types.h"
#include "varnam-util.h"
#include "varnam-result-codes.h"
#include "varnam-symbol-table.h"
#include "varnam-words-table.h"
#include "varnam-token.h"
#include "varray.h"
#include "api.h"
#include "vtypes.h"
#include "util.h"
#include "result-codes.h"
#include "symbol-table.h"
#include "words-table.h"
#include "token.h"
#include "renderer/renderers.h"

static struct varnam_internal*
Expand Down
8 changes: 4 additions & 4 deletions varnam.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

#include <stdlib.h>

#include "varnam-util.h"
#include "varnam-types.h"
#include "varnam-result-codes.h"
#include "varnam-api.h"
#include "util.h"
#include "vtypes.h"
#include "result-codes.h"
#include "api.h"

#endif
4 changes: 2 additions & 2 deletions varnam-array.c → varray.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "varnam-array.h"
#include "varnam-util.h"
#include "varray.h"
#include "util.h"

varray*
varray_init()
Expand Down
Loading

0 comments on commit 51c6a6a

Please sign in to comment.