Skip to content

Commit

Permalink
Add CodeBlocks project
Browse files Browse the repository at this point in the history
  • Loading branch information
cooljeanius committed Aug 6, 2012
1 parent b5e9621 commit b74a1fa
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 47 deletions.
71 changes: 71 additions & 0 deletions CodeBlocks/CommonWords.cbp
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="CommonWords" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/CommonWords" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/CommonWords" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wundef" />
<Add option="-Wfloat-equal" />
<Add option="-Winline" />
<Add option="-Wunreachable-code" />
<Add option="-Wmissing-declarations" />
<Add option="-Wmissing-include-dirs" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Weffc++" />
<Add option="-Wmain" />
<Add option="-pedantic" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-pg" />
<Add option="-g" />
</Compiler>
<Linker>
<Add option="-pg" />
</Linker>
<Unit filename="../CommonWords_linked.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../CommonWords_main.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../libword.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../libword.h" />
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
17 changes: 17 additions & 0 deletions CodeBlocks/CommonWords.depend
@@ -0,0 +1,17 @@
# depslib dependency file v1.0
1344257778 source:/Users/localadmin/Documents/School/Computer Science/Intro to C/CommonWords/CommonWords_linked.c
"libword.h"

1344257495 /Users/localadmin/Documents/School/Computer Science/Intro to C/CommonWords/libword.h
<stdio.h>
<stdlib.h>
<string.h>

1344214984 source:/Users/localadmin/Documents/School/Computer Science/Intro to C/CommonWords/CommonWords_main.c
<stdio.h>
<stdlib.h>
<string.h>

1344257778 source:/Users/localadmin/Documents/School/Computer Science/Intro to C/CommonWords/libword.c
"libword.h"

4 changes: 4 additions & 0 deletions CodeBlocks/CommonWords.layout
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
</CodeBlocks_layout_file>
64 changes: 17 additions & 47 deletions CommonWords.1
Expand Up @@ -3,47 +3,19 @@
.\"man mdoc.samples for a complete listing of options
.\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template
.Dd 8/4/12 \" DATE
.Dd 6/14/12 \" DATE
.Dt CommonWords 1 \" Program name and manual section number
.Os Darwin
.Sh NAME \" Section Header - required - don't modify
.Nm CommonWords,
.Nm CommonWords
.\" The following lines are read in generating the apropos(man -k) database. Use only key
.\" words here as the database is built based on the words here and in the .ND line.
.Nm Other_name_for_same_program(),
.Nm Yet another name for the same program.
.\" Use .Nm macro to designate other names for the documented program.
.Nd This line parsed for whatis database.
.Sh SYNOPSIS \" Section Header - required - don't modify
.Nm
.Op Fl abcd \" [-abcd]
.Op Fl a Ar path \" [-a path]
.Op Ar file \" [file]
.Op Ar \" [file ...]
.Ar arg0 \" Underlined argument - use .Ar anywhere to underline
arg2 ... \" Arguments
.Nm
.Sh DESCRIPTION \" Section Header - required - don't modify
Use the .Nm macro to refer to your program throughout the man page like such:
.Nm
Underlining is accomplished with the .Ar macro like this:
.Ar underlined text .
.Pp \" Inserts a space
A list of items with descriptions:
.Bl -tag -width -indent \" Begins a tagged list
.It item a \" Each item preceded by .It macro
Description of item a
.It item b
Description of item b
.El \" Ends the list
.Pp
A list of flags and their descriptions:
.Bl -tag -width -indent \" Differs from above in tag removed
.It Fl a \"-a flag as a list item
Description of -a flag
.It Fl b
Description of -b flag
.El \" Ends the list
.Pp
Goes through a file called "input.dat", searches for common words, and outputs the results to a file called "output.dat".
.\" (At least that's what it's supposed to do)
.\" .Sh ENVIRONMENT \" May not be needed
.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1
.\" .It Ev ENV_VAR_1
Expand All @@ -52,11 +24,9 @@ Description of -b flag
.\" Description of ENV_VAR_2
.\" .El
.Sh FILES \" File used or created by the topic of the man page
.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact
.It Pa /usr/share/file_name
FILE_1 description
.It Pa /Users/joeuser/Library/really_long_file_name
FILE_2 description
.It Pa /usr/local/share/man/man1/CommonWords.1
/usr/local/share/man/man1/CommonWords.1
manpage
.El \" Ends the list
.\" .Sh DIAGNOSTICS \" May not be needed
.\" .Bl -diag
Expand All @@ -68,12 +38,12 @@ FILE_2 description
.Sh SEE ALSO
.\" List links in ascending order by section, alphabetically within a section.
.\" Please do not reference files that do not exist without filing a bug report
.Xr a 1 ,
.Xr b 1 ,
.Xr c 1 ,
.Xr a 2 ,
.Xr b 2 ,
.Xr a 3 ,
.Xr b 3
.\" .Sh BUGS \" Document known, unremedied bugs
.\" .Sh HISTORY \" Document history if command behaves in a unique manner
.Xr CommonWords 1
.Sh BUGS \" Document known, unremedied bugs
The name "input.dat" is hard-coded, so this program can't operate on any other files.

The length of the input file is also hard-coded due to faulty EOF handling, so using a file that is longer can result in an EXC_BAD_ACCESS error, and using a file that is shorter can result in junk data being appended to the end of the results.

The structure of the input file is assumed to be the same as the provided input.dat file, so if this program is used on files structured in any other way, it will most likely produce incorrect results.

.\" .Sh HISTORY \" Document history if command behaves in a unique manner

0 comments on commit b74a1fa

Please sign in to comment.