Fedora core 4를 2012년 8월 13일인 오늘 설치하여

yum 을 사용하려고 보니 repository 설정이 사용 불가능한 서버를 가리키고 있었다.

fedora:[~]# yum install proftpd

Loading "installonlyn" plugin

Setting up Install Process

Setting up repositories

core                                                                [1/3]

http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>

Trying other mirror.

Cannot open/read repomd.xml file for repository: core

failure: repodata/repomd.xml from core: [Errno 256] No more mirrors to try.

Error: failure: repodata/repomd.xml from core: [Errno 256] No more mirrors to try.


따라서 인터넷을 찾아보아 새로운 repository 설정법을 찾았다.

아래 3개의 파일에서 baseurl을 변경해주면 된다. mirrorlist 모두 주석처리 했다.

/etc/yum.repos.d/fedora-core.repo

 [core]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/$releasever/$basearch/os/


[core-debuginfo]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/$releasever/$basearch/debug/


[core-source]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/$releasever/source/SRPMS/


/etc/yum.repos.d/fedora-updates.repo

 [updates]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/updates/$releasever/$basearch/

...


[updates-debuginfo]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/updates/$releasever/$basearch/debug/


[updates-source]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/core/updates/$releasever/SRPMS/


/etc/yum.repos.d/fedora-extras.repo

 [extras]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/extras/$releasever/$basearch/


[extras-debuginfo]

...

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/extras/$releasever/$basearch/debug/


[extras-source]

baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/extras/$releasever/SRPMS/



Posted by bluekm
,

헷갈리기 쉬운 문자열 함수 null character 처리 결과

예제 strncpy 1)
    char *strNum = "1234567890";        // null 포함 11 character
    char strBuf[12] = "ABCDEFGHIJK";    // null 포함 12 character

    printf("\n");
    printf(" strNum = \"%s\", strlen = %d \n", strNum, strlen(strNum));
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    strncpy(strBuf, strNum, 10);
    printf(" strBuf <----strncpy(n:10)---- strNum \n");

    printf("\n");
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    ----------------------------- 결과 -------------------------------
    strNum = "1234567890", strlen = 10
    strBuf = "ABCDEFGHIJK", strlen = 11

    strBuf <----strncpy(n:10)---- strNum

    strBuf = "1234567890K", strlen = 11 
    ------------------------------------------------------------------

예제 strncpy 2)
    char *strNum = "1234567890";        // null 포함 11 character
    char strBuf[12] = "ABCDEFGHIJK";    // null 포함 12 character

    printf("\n");
    printf(" strNum = \"%s\", strlen = %d \n", strNum, strlen(strNum));
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    strncpy(strBuf, strNum, 11);
    printf(" strBuf <----strncpy(n:11)---- strNum \n");

    printf("\n");
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    ----------------------------- 결과 -------------------------------
    strNum = "1234567890", strlen = 10
    strBuf = "ABCDEFGHIJK", strlen = 11

    strBuf <----strncpy(n:11)---- strNum

    strBuf = "1234567890", strlen = 10 
    ------------------------------------------------------------------


예제 snprintf 1)
    char *strNum = "1234567890";        // null 포함 11 character
    char strBuf[12] = "ABCDEFGHIJK";    // null 포함 12 character

    printf("\n");
    printf(" strNum = \"%s\", strlen = %d \n", strNum, strlen(strNum));
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    snprintf(strBuf, 10, "%s", strNum);
    printf(" strBuf <----snprintf(n:10)---- strNum \n");

    printf("\n");
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    ----------------------------- 결과 -------------------------------
    strNum = "1234567890", strlen = 10
    strBuf = "ABCDEFGHIJK", strlen = 11

    strBuf <----snprintf(n:10)---- strNum

    strBuf = "123456789", strlen = 9 
    ------------------------------------------------------------------

예제 snprintf 2)
    char *strNum = "1234567890";        // null 포함 11 character
    char strBuf[12] = "ABCDEFGHIJK";    // null 포함 12 character

    printf("\n");
    printf(" strNum = \"%s\", strlen = %d \n", strNum, strlen(strNum));
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    snprintf(strBuf, 11, "%s", strNum);
    printf(" strBuf <----snprintf(n:11)---- strNum \n");

    printf("\n");
    printf(" strBuf = \"%s\", strlen = %d \n", strBuf, strlen(strBuf));
    printf("\n");

    ----------------------------- 결과 -------------------------------
    strNum = "1234567890", strlen = 10
    strBuf = "ABCDEFGHIJK", strlen = 11

    strBuf <----snprintf(n:11)---- strNum

    strBuf = "1234567890", strlen = 10 
    ------------------------------------------------------------------

Posted by bluekm
,


xv-3.10a.jumbopatch.20070520-10.fc12.src.rpm


xv-3.10a.jumbopatch.20070520-10.fc12.src.tgz


xv-3.10a.jumbopatch.20070520.tgz

 


그동안 잘 사용하고 있던  xv-3.10a 정식 버전( 다운링크 : http://www.trilon.com/xv/downloads.html )

은 16bit bmp를 로드할 수 없음을 알았다.


찾아보던 중 어떤 리눅스 배포본에 있는  xv-3.10a는 타이틀에 날짜가 박혀있고 16bit bmp를 로드할 수 있음을 알아내었다.


따라서 16bit bmp 를 로드할 수 있는 xv-3.10a + jumbopatch(20070520)를 공유하려 한다.


xv-3.10a.jumbopatch.20070520-10.fc12.src.rpm :

    - xv-3.10a 소스와 20070520 일자 jumbopatch 가 묶여 있는 rpm 패키지 이다. 인터넷에서 받은 원본...

xv-3.10a.jumbopatch.20070520-10.fc12.src.tgz :

    - 위 rpm 패키지의 압축을 풀어 tar + gzip 압축으로 묶은 것이다. rpm을 사용할 수 없는 시스템을 위하여...

xv-3.10a.jumbopatch.20070520.tgz :

    - 위 rpm 패키지에 있는 xv-3.10a 소스에 jumbopatch 및 몇가지 패치를 적용하여 다시 묶은 tarball 파일.

 

Posted by bluekm
,