Programming/C Win32 MFC2009. 3. 24. 11:16
main 함수의 기본 프로토타입은 int main(int argc, char *argv[]) 이다.
물론 귀찮아서 void main()으로 주로 쓰긴 하지만, 인자를 받기 위해서는 저 프로토타입을 써야 한다.
아무튼 막상 인자로 받다가 그 인자를 만들어 내려니 자꾸만 안되서 머리를 데굴데굴 굴려봤다.




음.. argv가 argument array인데,
argv[0]은 실행프로그램(자기자신)의 경로+이름
argv[1] 부터 인자가 들어 간다.
그리고 마지막은 null이 들어간다.

    int argc = 2;
    char str1[] = "a.out";
    char str2[] = "/dev/fb0";
    char str3[] = "";
    char *strs[] = {str1,str2,str3};
    char **argv = strs;
아무튼 꼼지락 대면서 겨우겨우 맞춰서 넣은 argc, argv 값들.. 하아..
조금 더 추려내면

    int argc = 2;
    char *strs[] = {"a.out", "/dev/fb0", ""};
    char **argv = strs;


간단하게 하는 방법은 정녕없는 것인가!
Posted by 구차니
cygwin은 윈도우에서 리눅스를 돌려주는 일종의 에뮬레이터이다.

What Is Cygwin?

Cygwin is a Linux-like environment for Windows. It consists of two parts:
  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.

    The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE.

    Note that the official support for Windows 95, Windows 98, and Windows Me will be discontinued with the next major version (1.7.0) of Cygwin, which is in beta testing right now.


  • What Isn't Cygwin?

  • Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.
  • Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.

  • 일단 찾아 보니 cygwin에 이식된 QT도 있으니,
    한번 소스를 받아서 cygwin + cygwin/x + KDE-cygwin + kscope 를 해봐야겠다.

    -- platfrom --
    [cygwin : http://www.cygwin.com/]
    [cygwin/x : http://x.cygwin.com/]
    [KDE-cygwin : http://kde-cygwin.sourceforge.net/]

    -- kscope subsystem --
    [ctags : http://ctags.sourceforge.net/]
    [cscope : http://cscope.sourceforge.net/]
    [kscope : http://kscope.sourceforge.net/]
    [graphviz : http://www.graphviz.org/]

    -- valgrind --
    [valgrind : http://valgrind.org/]
    [KCachegrind : http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindIndex]
    Posted by 구차니
    Microsoft/Windows2009. 3. 23. 18:20

    Basic Naming Conventions

    The following fundamental rules enable applications to create and process valid names for files and directories, regardless of the file system:

    • Use a period to separate the base file name from the extension in the name of a directory or file.
    • Use a backslash (\) to separate the components of a path. The backslash divides the file name from the path to it, and one directory name from another directory name in a path. For additional details about what a path is, see the Path Names and Namespaces section below.
    • Use a backslash as required as part of volume names, for example, the "C:\" in "C:\path\file" or the "\\server\share" in "\\server\share\path\file" for Universal Naming Convention (UNC) names. You cannot use a backslash in the actual file or directory name components because it separates the names into components.
    • Use almost any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for the following:

      • The following reserved characters are not allowed:

        < > : " / \ | ? *

      • Characters whose integer representations are in the range from zero through 31 are not allowed.
      • Any other character that the target file system does not allow.
    • Use a period as a directory component in a path to represent the current directory, for example ".\tmp.txt".
    • Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory, for example "..\tmp.txt".
    • Do not use the following reserved device names for the name of a file:

      CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9

      Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.

    • Do not assume case sensitivity. For example, consider the names OSCAR, Oscar, and oscar to be the same, even though some file systems (such as a POSIX-compliant file system) may consider them as different. Note that NTFS supports POSIX semantics for case sensitivity but this is not the default behavior. For additional information, see CreateFile.
    • Do not end a file or directory name with a trailing space or a period. Although the underlying file system may support such names, the operating system does not. However, it is acceptable to start a name with a period.

    [출처 : http://msdn.microsoft.com/en-us/library/aa365247.aspx]




    Posted by 구차니


    <title>R&eacute;sultats pour&nbsp;manual</title>

    [출처 : http://advancedsearch.motorola.com/socialsearch/query?q=manual&qp...]



    (머리에) 총 맞은 것처럼 문득 이런 생각이 들었습니다.
    '아하! 프랑스어 핸드폰 메뉴얼을 보면 프랑스어 입력 방법을 알 수 있지 않을까!'

    라는 전제는 맞았는데..
    Oh my god!
    내가 프랑스어를 전혀 모른다는 필요조건을 만족 시켜 주지 않음으로 인한 좌절 OTL 털썩

    아무튼 V150 이라는 핸드폰의 메뉴얼을 보니..












    먼소리여!!!! OTL


    [출처 : http://www.motorola.com/Hellomoto/...]
    Posted by 구차니
    개소리 왈왈2009. 3. 23. 01:00
    SEO : Search Engine Optimization 의 약자로, 검색에서 잘 걸려 나오게 하는 기법을 이야기 한다.

    개인적으로는 블로그를 수익에 이용하거나, 파워블로그라고 칭해지길 강렬하게 바라지 않기에
    손이 가는대로 블로그를 갈겨써내려 간다.


    그래도 문득, 구글에서 이미지 검색을 하는데,
    이미지의 파일이름으로 검색한다는 사실이 생각이 들었다.


    아 젠장!
    앞으로는 사진 파일이름도 의미가 있는 단어로 해야겠구나!





    사족 : 귀차니즘으로 인해, 설명시에는 1.png 2.png ... n.png  식으로 사용했는데, 다시 올리는건 매우 귀찮으니..
    앞으로는 subejct-1.png 이런식으로 주제를 담아서 파일이름을 정성껏 입력해야겠다.

    '개소리 왈왈' 카테고리의 다른 글

    네이버 웹툰 도자기 작가 '호연'님에게 성금을  (4) 2009.03.29
    강동도서관 이용시간  (6) 2009.03.27
    NateOn 강제 업데이트  (0) 2009.03.23
    완벽한 S라인!  (6) 2009.03.21
    배고파 죽고 물마시다 죽고?  (4) 2009.03.20
    Posted by 구차니
    나야 .net을 싫어해서 아직도 VC++ 6.0을 쓰지만..
    아무튼 우연히 알게 된 사실인데

    Vista에서 .net 2003을 실행할수 없다고 한다!
    혹시사 해서 찾아 봤더니 MSDN에도 이렇게 밝히고 있다.

    릴리스

    Windows Vista에 설치할 수 있는지 여부

    이번 버전을 사용하여 개발한 응용 프로그램을 Windows Vista에 설치할 수 있는지 여부

    Visual Studio 2008 

    Windows Vista에 대한 Visual Studio 2005 서비스 팩 1 업데이트

    Visual Studio 2005 서비스 팩 1

    Visual Studio 2005 

    아니요

    Visual Studio .NET 2003 서비스 팩 1

    아니요

    예(응용 프로그램이 .NET Framework 1.1 이상 버전을 대상으로 하는 경우)

    Visual Studio .NET 2003

    아니요

    예(응용 프로그램이 .NET Framework 1.1 이상 버전을 대상으로 하는 경우)

    Visual Studio .NET 2002

    아니요

    아니요



    [링크 : http://msdn.microsoft.com/ko-kr/library/aa983432.aspx]
    Posted by 구차니
    개소리 왈왈2009. 3. 23. 00:36

    오늘 마우스 바꾸는 바람에 리부팅을 했는데, 갑자기 네이트온 설치가 뜨면서 UI가 확 바뀌었다.
    msn 느낌이라고 해야 하나.. 메탈릭 실버에 아쿠아를 넣어서 iMac 느낌이 든다고 해야 하나...
    아무튼 예전과는 다른 아이콘들 덕분에 웬지 어색하고, UI가 달라진 만큼, 기존의 디자인을 선택적으로
    사용이 가능했으면 더 좋지 않았을까 하는 아쉬움이 든다.

    '개소리 왈왈' 카테고리의 다른 글

    강동도서관 이용시간  (6) 2009.03.27
    SEO에 대한 짧은 의견  (2) 2009.03.23
    완벽한 S라인!  (6) 2009.03.21
    배고파 죽고 물마시다 죽고?  (4) 2009.03.20
    순디자인연구소 소장님을 뵙고 왔습니다.  (12) 2009.03.18
    Posted by 구차니
    개소리 왈왈/컴퓨터2009. 3. 22. 17:15
    거의 1년간 끌어 온 녀석들 부터, 신규 지름신까지 한번 간만에 목록을 정리해봐야겠다.
    (월급날이 코앞인 관계로!!)

    --- 반드시 사야할 것/써야할 것 ---
    1. US Technology AVR USB Programmer / AVR JTAG - 둘중 하나 선택 대략 4만원
    2. 스피커 - 5.1채널 3만원
    3. 노트북 빨콩 수리 - 대책이 없음

    --- 사면 좋고 안사도 그만인 것 ---
    4. 사운드 카드 - 광출력되는 녀석으로 5.1채널 이상 2만원
    5. 중고 노트북 - 대략 35만원
    6. 노트북 하드 - 가격도 안봤음
    7. MD 배터리


    일단 개인 공부를 위해서라도 언넝 번역 작업을 마치고, 바로 AVR 공부할수 있도록 JTAG 부터 질러야겠다.
    거의 1년째 계속 공부 한다고만 하다가 밀려왔던 넘이라 미안하기도 하고..
    이 녀석을 지르고 나면 공부 한답시고 이것저것 또 지르게 될테니 지금의 적은 돈이 앞의 많은돈을 부를
    강력한 지름신 아이템이라 조금은 두렵다 -ㅁ-

    그리고 사운드 + 스피커는 일단 내장형이 5.1 채널 지원하니
    사운드 카드는 MD 배터리 이후에 질러야겠다.(쓰긴 쓸려나..)

    일단 내 노트북 부터 수리를 해야 하는데.. 후우.. 과연 키보드는 또 얼마나 견적이 나와주실려나 ^^;

    '개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

    늙어간다는 것은..  (4) 2009.12.25
    TC-1100 타블렛 노트북  (2) 2009.12.11
    포맷은 주말에.... OTL  (0) 2009.07.02
    간만에 지름신 - 하드를 질렀습니다!!  (14) 2009.07.01
    추억의 프로그램 릴레이  (8) 2009.03.19
    Posted by 구차니
    개소리 왈왈2009. 3. 21. 09:48

    웬지 방문자가 주중에 몰리는 경향이 슬프다.

    부연 설명을 하자면..
    간단하게 말해서 대학 리포트용 블로그의 느낌이랄까..
    Posted by 구차니
    개소리 왈왈/영화2009. 3. 20. 23:36


    샤방샤방~ 우리 곰팅이랑

    '개소리 왈왈 > 영화' 카테고리의 다른 글

    곰팅이!  (0) 2009.04.26
    노잉(knowing) 울트라 초초초 스포일링 (2009)  (2) 2009.04.19
    워낭소리 - Old partner (2009)  (6) 2009.03.08
    사기컷이 아닙니다!!  (0) 2009.02.06
    나의 천사  (19) 2009.01.17
    Posted by 구차니