Permalink
Browse files

Merge branch 'master' of github.com:rafiks/my-sandbox

Conflicts:
	hello
  • Loading branch information...
2 parents 65ddb60 + a687fe7 commit 92c1335d9022a137b019587d0a4418a5f4642c72 @rafiks committed Jan 4, 2013
View
3 -.s
@@ -0,0 +1,3 @@
+ .file "-"
+
+ .section ".note.GNU-stack","",@progbits
View
BIN .DS_Store
Binary file not shown.
View
BIN buildstr1
Binary file not shown.
View
BIN deal
Binary file not shown.
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.deal</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
View
BIN editor
Binary file not shown.
View
@@ -0,0 +1,34 @@
+#include <iostream>
+#include <fstream>
+#include <string.h>
+using namespace std;
+
+int main(int argc, char const *argv[])
+{
+ char filename[81];
+ char input_line[81];
+
+ cout << "filename: ";
+ cin.getline(filename, 80);
+
+ ofstream file_out(filename);
+
+ if (! file_out)
+ {
+ cout << "File " << filename << "could not be opened.";
+ return -1;
+ }
+
+ cout << "File " << filename << "was opened." << endl;
+ while(1){
+ cout << "@@@ to exit: ";
+ cin.getline(input_line, 80);
+ if (strcmp(input_line, "@@@")== 0)
+ {
+ break;
+ }
+ file_out << input_line << endl;
+ }
+ file_out.close();
+ return 0;
+}
View
@@ -0,0 +1,4 @@
+jfkafja
+afdafdafjafldkafj
+fajfdkfjda
+fafjasflsa
Submodule gdb added at df2c9e
View
BIN getc
Binary file not shown.
View
10 getc.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+
+int main(int argc, const char *argv[])
+{
+ int c;
+ while ((c = getchar()) != EOF) {
+ putchar(c);
+ }
+ return 0;
+}
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.getc</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
View
@@ -0,0 +1,34 @@
+#include <ctype.h>
+#include <stdio.h>
+
+int getch(void);
+void ungetch(int);
+
+int main(int argc, const char *argv[])
+{
+ getint(1233);
+ return 0;
+}
+int getint(int *pn){
+ int c, sign;
+
+ while (isspace(c = getch())) {
+ ;
+ }
+ if (!isdigit(c) && c != EOF && c != '+' && c != '-') {
+ ungetch(c);
+ return 0;
+ }
+ sign = (c == '-') ? -1 : 1;
+ if (c == '+' || c == '-') {
+ c = getch();
+ }
+ for (*pn = 0; isdigit(c); c = getch()) {
+ *pn *= 10 * *pn + (c - '0');
+ }
+ *pn *= sign;
+ if (c != EOF) {
+ ungetch(c);
+ }
+ return c;
+}
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.hello</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
View
Binary file not shown.
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.lexi-gdb-mac</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.lexi</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
View
BIN ptr-test
Binary file not shown.
View
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+void swap(int *x, int *y);
+
+int main(int argc, const char *argv[])
+{
+ int x = 1;
+ int y = 2;
+
+ swap(&x, &y);
+ return 0;
+}
+
+void swap(int *x, int *y){
+ int temp;
+
+ temp = *x;
+ *x = *y;
+ *y = temp;
+}
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.xcode.dsym.ptr-test</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>dSYM</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ </dict>
+</plist>
Binary file not shown.
View
@@ -0,0 +1,64 @@
+#include <iostream>
+#include <cstdlib>
+#include <fstream>
+#include <string.h>
+using namespace std;
+
+
+void convert_to_upper(char *s);
+
+int main()
+{
+ int c;
+ int i;
+
+ char filename[81];
+ char input_line[81];
+
+ cout << "Enter a filename and press Enter: ";
+ cin.getline(filename,80);
+
+ ifstream file_in(filename);
+
+ if (!file_in)
+ {
+ cout << "FIle " << filename;
+ cout << "could not be opened.";
+ return -1;
+ }
+
+ int lines_to_read = 20; //default 20
+ while (1){
+ for (i = 1; i <= lines_to_read && ! file_in.eof(); ++i)
+ {
+ file_in.getline(input_line,80);
+ convert_to_upper(input_line);
+ cout << input_line << endl;
+ }
+ if (file_in.eof())
+ {
+ break;
+ }
+ cout << "More? (Press 'Q' and Enter to quit.)";
+ cin.getline(input_line,80);
+ c = input_line[0];
+ if (c == 'Q' || c == 'q')
+ {
+ break;
+ }
+ else if (strlen(input_line) > 0)
+ {
+ lines_to_read = atoi(input_line);
+ }
+ }
+
+ return 0;
+}
+
+void convert_to_upper(char *s) {
+ int i;
+ int length = strlen(s);
+
+ for (i = 0; i < length; i++)
+ s[i] = toupper(s[i]);
+}
View
BIN readtxt
Binary file not shown.
View
@@ -0,0 +1,49 @@
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+int main()
+{
+ int c;
+ int i;
+
+ char filename[81];
+ char input_line[81];
+
+ cout << "Enter a filename and press Enter: ";
+ cin.getline(filename,80);
+
+ ifstream file_in(filename);
+
+ if (!file_in)
+ {
+ cout << "FIle " << filename;
+ cout << "could not be opened.";
+ return -1;
+ }
+
+ while (1){
+ int line = 0;
+ for (i = 1; i <= line && ! file_in.eof(); ++i)
+ {
+ file_in.getline(input_line,80);
+ cout << input_line << endl;
+ }
+ if (file_in.eof())
+ {
+ break;
+ }
+ cout << "More? (Press 'Q' and Enter to quit.)";
+ cin.getline(input_line,80);
+ c = input_line[0];
+ if (c == 'Q' || c == 'q')
+ {
+ break;
+ }
+ if (line = atoi(c))
+ {
+ /* code */
+ }
+ }
+ return 0;
+}
Oops, something went wrong.

0 comments on commit 92c1335

Please sign in to comment.